summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-11-16 00:40:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-11-16 00:40:46 (GMT)
commit3176bd0b0da232207df99802bd714f51bc10f153 (patch)
tree9fb8a4d8c2a905dbb6811814c01feb11e5d6e082 /t
parent578e5efd46efdacd4b48cb2e72b007f72de3cd9b (diff)
parent24ab81ae4d12c81076da256b3f9cdde45277f126 (diff)
downloadgit-3176bd0b0da232207df99802bd714f51bc10f153.zip
git-3176bd0b0da232207df99802bd714f51bc10f153.tar.gz
git-3176bd0b0da232207df99802bd714f51bc10f153.tar.bz2
Merge branch 'jk/maint-add-p-empty'
* jk/maint-add-p-empty: add-interactive: handle deletion of empty files
Diffstat (limited to 't')
-rwxr-xr-xt/t3701-add-interactive.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh
index 687bd7a..d86bc81 100755
--- a/t/t3701-add-interactive.sh
+++ b/t/t3701-add-interactive.sh
@@ -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