summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-12-08 22:47:09 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-12-08 22:47:09 -0800
commitff86bdd5cac70850eea4791bea78efa19b228ebe (patch)
treee80c89fbffa06c6990886a92112547cf66ca2a07 /t
parentMerge git://git.bogomips.org/git-svn (diff)
parentMerge branch 'mm/maint-merge-ff-error-message-fix' into maint (diff)
downloadtgif-ff86bdd5cac70850eea4791bea78efa19b228ebe.tar.xz
Merge branch 'maint'
* maint: add-interactive: fix deletion of non-empty files pull: clarify advice for the unconfigured error case
Diffstat (limited to 't')
-rwxr-xr-xt/t3701-add-interactive.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh
index d86bc81abf..b6eba6a839 100755
--- a/t/t3701-add-interactive.sh
+++ b/t/t3701-add-interactive.sh
@@ -229,6 +229,26 @@ test_expect_success 'add first line works' '
'
cat >expected <<EOF
+diff --git a/non-empty b/non-empty
+deleted file mode 100644
+index d95f3ad..0000000
+--- a/non-empty
++++ /dev/null
+@@ -1 +0,0 @@
+-content
+EOF
+test_expect_success 'deleting a non-empty file' '
+ git reset --hard &&
+ echo content >non-empty &&
+ git add non-empty &&
+ git commit -m non-empty &&
+ rm non-empty &&
+ echo y | git add -p non-empty &&
+ git diff --cached >diff &&
+ test_cmp expected diff
+'
+
+cat >expected <<EOF
diff --git a/empty b/empty
deleted file mode 100644
index e69de29..0000000