summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-02-16 14:08:00 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-02-16 14:08:00 -0800
commit6c63ab3ca7abc50155acc6c28380435fb79f7fa9 (patch)
tree61f4f31ceb45e7be429055e9a34df66ba69d7764 /t
parentMerge branch 'mm/empty-loose-error-message' into maint (diff)
parentcommit: ignore intent-to-add entries instead of refusing (diff)
downloadtgif-6c63ab3ca7abc50155acc6c28380435fb79f7fa9.tar.xz
Merge branch 'jc/maint-commit-ignore-i-t-a' into maint
* jc/maint-commit-ignore-i-t-a: commit: ignore intent-to-add entries instead of refusing Conflicts: cache-tree.c
Diffstat (limited to 't')
-rwxr-xr-xt/t2203-add-intent.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/t/t2203-add-intent.sh b/t/t2203-add-intent.sh
index 25435290a7..ec35409f9c 100755
--- a/t/t2203-add-intent.sh
+++ b/t/t2203-add-intent.sh
@@ -32,7 +32,7 @@ test_expect_success 'intent to add does not clobber existing paths' '
! grep "$empty" actual
'
-test_expect_success 'cannot commit with i-t-a entry' '
+test_expect_success 'i-t-a entry is simply ignored' '
test_tick &&
git commit -a -m initial &&
git reset --hard &&
@@ -41,12 +41,14 @@ test_expect_success 'cannot commit with i-t-a entry' '
echo frotz >nitfol &&
git add rezrov &&
git add -N nitfol &&
- test_must_fail git commit -m initial
+ git commit -m second &&
+ test $(git ls-tree HEAD -- nitfol | wc -l) = 0 &&
+ test $(git diff --name-only HEAD -- nitfol | wc -l) = 1
'
test_expect_success 'can commit with an unrelated i-t-a entry in index' '
git reset --hard &&
- echo xyzzy >rezrov &&
+ echo bozbar >rezrov &&
echo frotz >nitfol &&
git add rezrov &&
git add -N nitfol &&