summaryrefslogtreecommitdiff
path: root/t/t3400-rebase.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-09-17 00:24:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-09-17 01:20:10 (GMT)
commitece7b74903007cee8d280573647243d46a6f3a95 (patch)
tree768d9bc4eaf26d832cc4f566385055e20f19dd39 /t/t3400-rebase.sh
parentf3caeb9ac2ea13cf113183540f32fbc4c0468ed5 (diff)
downloadgit-ece7b74903007cee8d280573647243d46a6f3a95.zip
git-ece7b74903007cee8d280573647243d46a6f3a95.tar.gz
git-ece7b74903007cee8d280573647243d46a6f3a95.tar.bz2
apply --index-info: fall back to current index for mode changes
"git diff" does not record index lines for pure mode changes (i.e. no lines changed). Therefore, apply --index-info would call out a bogus error. Instead, fall back to reading the info from the current index. Incidentally, this fixes an error where git-rebase would not rebase a commit including a pure mode change, and changes requiring a threeway merge. Noticed and later tested by Chris Shoemaker. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3400-rebase.sh')
-rwxr-xr-xt/t3400-rebase.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index 62205b2..95e33b5 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -68,4 +68,19 @@ test_expect_success \
test 3 = $(git rev-list master.. | wc -l)
'
+test_expect_success 'rebase a single mode change' '
+ git checkout master &&
+ echo 1 > X &&
+ git add X &&
+ test_tick &&
+ git commit -m prepare &&
+ git checkout -b modechange HEAD^ &&
+ echo 1 > X &&
+ git add X &&
+ chmod a+x A &&
+ test_tick &&
+ git commit -m modechange A X &&
+ GIT_TRACE=1 git rebase master
+'
+
test_done