aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-08-26 12:05:57 -0700
committerJunio C Hamano <gitster@pobox.com>2009-08-26 12:05:57 -0700
commitbb0c8065f167a29e22f22e6e1355096395475430 (patch)
tree5760c1a4aa507c3c3fb6b4d76256b630ab1138ec /t
parentd9b9784f572a71b2f4ea0f8772b0d586ea0f848f (diff)
parent9e4a90ba19033d25dca1eea495b0a8c5f06efbc6 (diff)
downloadgit-bb0c8065f167a29e22f22e6e1355096395475430.tar.gz
git-bb0c8065f167a29e22f22e6e1355096395475430.tar.xz
Merge branch 'maint-1.6.3' into maint
* maint-1.6.3: add -p: do not attempt to coalesce mode changes git add -p: demonstrate failure when staging both mode and hunk
Diffstat (limited to 't')
-rwxr-xr-xt/t3701-add-interactive.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh
index fd2a55a5c..62fd65e18 100755
--- a/t/t3701-add-interactive.sh
+++ b/t/t3701-add-interactive.sh
@@ -163,6 +163,17 @@ test_expect_success FILEMODE 'stage mode but not hunk' '
git diff file | grep "+content"
'
+
+test_expect_success FILEMODE 'stage mode and hunk' '
+ git reset --hard &&
+ echo content >>file &&
+ chmod +x file &&
+ printf "y\\ny\\n" | git add -p &&
+ git diff --cached file | grep "new mode" &&
+ git diff --cached file | grep "+content" &&
+ test -z "$(git diff file)"
+'
+
# end of tests disabled when filemode is not usable
test_expect_success 'setup again' '