X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft2203-add-intent.sh;h=ec35409f9cbe9bcdd3d21a6a5a15996b165d2fff;hb=3f6d56de5f99ec5f0667bef4411f2515b253a5b2;hp=25435290a71ae8031762a3e63537fd3a23a8fc90;hpb=f174a2583c9f42315b60205890fa67a79a1f1669;p=git.git diff --git a/t/t2203-add-intent.sh b/t/t2203-add-intent.sh index 25435290a..ec35409f9 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 &&