summaryrefslogtreecommitdiff
path: root/t/t3701-add-interactive.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-11-16 00:02:44 -0800
committerJunio C Hamano <gitster@pobox.com>2009-11-16 00:02:44 -0800
commit5e9cb8666bae6a5c8adcb26e3f46b8a5fe5be589 (patch)
tree469a68e905236e91ac77d470d37ef6ae63617278 /t/t3701-add-interactive.sh
parentd404a3e1a5588fa075e4fae6679603a5add2e4df (diff)
parent24ab81ae4d12c81076da256b3f9cdde45277f126 (diff)
downloadgit-5e9cb8666bae6a5c8adcb26e3f46b8a5fe5be589.tar.gz
Merge branch 'jk/maint-add-p-empty' into maint
* jk/maint-add-p-empty: add-interactive: handle deletion of empty files
Diffstat (limited to 't/t3701-add-interactive.sh')
-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 687bd7ab53..d86bc81abf 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