summaryrefslogtreecommitdiff
path: root/t/t3701-add-interactive.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-08-26 18:22:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-08-26 18:22:00 (GMT)
commit9e4a90ba19033d25dca1eea495b0a8c5f06efbc6 (patch)
tree5754b630105cf960385bfa374dd1d986fd2e96ff /t/t3701-add-interactive.sh
parent57f6ec029090f64377ec5c0926b6e2e39b0caa4f (diff)
parent3d792161b1c86632d5331bb30d6b7c6b17261f38 (diff)
downloadgit-9e4a90ba19033d25dca1eea495b0a8c5f06efbc6.zip
git-9e4a90ba19033d25dca1eea495b0a8c5f06efbc6.tar.gz
git-9e4a90ba19033d25dca1eea495b0a8c5f06efbc6.tar.bz2
Merge branch 'tr/maint-1.6.3-add-p-modeonly-fix' into maint-1.6.3
* tr/maint-1.6.3-add-p-modeonly-fix: add -p: do not attempt to coalesce mode changes git add -p: demonstrate failure when staging both mode and hunk
Diffstat (limited to 't/t3701-add-interactive.sh')
-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 fd2a55a..62fd65e 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' '