diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-07-04 23:40:31 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-07-04 23:40:59 +0300 |
commit | a631e99807f4cd5e98594452992f7343268ac56b (patch) | |
tree | d24d341ceae6ae1b737394952a952b2fd97a9b70 /t/t3701-add-interactive.sh | |
parent | 69ab3309e96279b3f323ceb1b8c2ebf670788c8e (diff) | |
parent | 4788e8b25692a8ae1a005554d3ad12f8ee4ee29e (diff) |
Merge 'js/add-i-delete' into maint-2.37
Rewrite of "git add -i" in C that appeared in Git 2.25 didn't
correctly record a removed file to the index, which is an old
regression but has become widely known because the C version
has become the default in the latest release.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3701-add-interactive.sh')
-rwxr-xr-x | t/t3701-add-interactive.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh index fc26cb8bae..b354fb39de 100755 --- a/t/t3701-add-interactive.sh +++ b/t/t3701-add-interactive.sh @@ -103,6 +103,15 @@ test_expect_success 'status works (commit)' ' grep "+1/-0 *+2/-0 file" output ' +test_expect_success 'update can stage deletions' ' + >to-delete && + git add to-delete && + rm to-delete && + test_write_lines u t "" | git add -i && + git ls-files to-delete >output && + test_must_be_empty output +' + test_expect_success 'setup expected' ' cat >expected <<-\EOF index 180b47c..b6f2c08 100644 |