]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t3701-add-interactive.sh
Merge branch 'jc/maint-am-keep'
[thirdparty/git.git] / t / t3701-add-interactive.sh
index 687bd7ab53397d3bc9d5150bc7cd290efa8ebdbc..d86bc81abfd954194c245e7e180a23f2b9b7c840 100755 (executable)
@@ -228,4 +228,21 @@ test_expect_success 'add first line works' '
        test_cmp expected diff
 '
 
+cat >expected <<EOF
+diff --git a/empty b/empty
+deleted file mode 100644
+index e69de29..0000000
+EOF
+
+test_expect_success 'deleting an empty file' '
+       git reset --hard &&
+       > empty &&
+       git add empty &&
+       git commit -m empty &&
+       rm empty &&
+       echo y | git add -p empty &&
+       git diff --cached >diff &&
+       test_cmp expected diff
+'
+
 test_done