summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-07-03 04:56:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-07-03 04:56:08 (GMT)
commit0f0bc2124b25476504e7215dc2af92d5748ad327 (patch)
tree9bf91ed4ff6697463eaa4c59bbcbcd25b0ab5c48 /t
parente4a4b31577c7419497ac30cebe30d755b97752c5 (diff)
parent4788e8b25692a8ae1a005554d3ad12f8ee4ee29e (diff)
downloadgit-0f0bc2124b25476504e7215dc2af92d5748ad327.zip
git-0f0bc2124b25476504e7215dc2af92d5748ad327.tar.gz
git-0f0bc2124b25476504e7215dc2af92d5748ad327.tar.bz2
Merge branch 'js/add-i-delete'
Rewrite of "git add -i" in C that appeared in Git 2.25 didn't correctly record a removed file to the index, which was fixed. * js/add-i-delete: add --interactive: allow `update` to stage deleted files
Diffstat (limited to 't')
-rwxr-xr-xt/t3701-add-interactive.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh
index fc26cb8..b354fb3 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