diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-04-09 00:29:24 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-04-09 00:29:24 -0700 |
commit | ce47dc077549d4952908a5377ab36474b2bd8446 (patch) | |
tree | 9b568c44db1488c2eb636bca33d0395f9545f25f /t | |
parent | ba9f517bdd2062d1d90d37e5b10d1688d48bc225 (diff) | |
parent | ca7246864b43e9ea1922cc5386225ecd1b3bdd98 (diff) | |
download | git-ce47dc077549d4952908a5377ab36474b2bd8446.tar.gz |
Merge branch 'jk/add-i-mode'
* jk/add-i-mode:
add--interactive: allow user to choose mode update
add--interactive: ignore mode change in 'p'atch command
Diffstat (limited to 't')
-rwxr-xr-x | t/t3701-add-interactive.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh index 77c90f6fa0..f15be93e77 100755 --- a/t/t3701-add-interactive.sh +++ b/t/t3701-add-interactive.sh @@ -66,4 +66,23 @@ test_expect_success 'revert works (commit)' ' grep "unchanged *+3/-0 file" output ' +test_expect_success 'patch does not affect mode' ' + git reset --hard && + echo content >>file && + chmod +x file && + printf "n\\ny\\n" | git add -p && + git show :file | grep content && + git diff file | grep "new mode" +' + +test_expect_success 'stage mode but not hunk' ' + git reset --hard && + echo content >>file && + chmod +x file && + printf "y\\nn\\n" | git add -p && + git diff --cached file | grep "new mode" && + git diff file | grep "+content" +' + + test_done |