diff options
Diffstat (limited to 't/t3701-add-interactive.sh')
-rwxr-xr-x | t/t3701-add-interactive.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh index d920d06d5..f15be93e7 100755 --- a/t/t3701-add-interactive.sh +++ b/t/t3701-add-interactive.sh @@ -70,9 +70,19 @@ test_expect_success 'patch does not affect mode' ' git reset --hard && echo content >>file && chmod +x file && - printf "y\\n" | git add -p && + 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 |