diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-03-12 23:21:33 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-03-12 23:21:33 -0700 |
commit | fb070d2f17b0619cbc1be0606fd452b2294abb8d (patch) | |
tree | ac351fe2b67febc13d3b27d8651ae7e2c70db81b /t/t3701-add-interactive.sh | |
parent | Merge branch 'jh/mingw-openssl-sha1' (diff) | |
parent | add--interactive: fix missing file prompt for patch mode with "-i" (diff) | |
download | tgif-fb070d2f17b0619cbc1be0606fd452b2294abb8d.tar.xz |
Merge branch 'jk/add-i-patch-do-prompt'
The patch subcommand of "git add -i" was meant to have paths
selection prompt just like other subcommand, unlike "git add -p"
directly jumps to hunk selection. Recently, this was broken and
"add -i" lost the paths selection dialog, but it now has been
fixed.
* jk/add-i-patch-do-prompt:
add--interactive: fix missing file prompt for patch mode with "-i"
Diffstat (limited to 't/t3701-add-interactive.sh')
-rwxr-xr-x | t/t3701-add-interactive.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh index 5ffe78e920..aaa258daa3 100755 --- a/t/t3701-add-interactive.sh +++ b/t/t3701-add-interactive.sh @@ -394,4 +394,22 @@ test_expect_success 'diffs can be colorized' ' grep "$(printf "\\033")" output ' +test_expect_success 'patch-mode via -i prompts for files' ' + git reset --hard && + + echo one >file && + echo two >test && + git add -i <<-\EOF && + patch + test + + y + quit + EOF + + echo test >expect && + git diff --cached --name-only >actual && + test_cmp expect actual +' + test_done |