X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft2203-add-intent.sh;h=58a329961e5c269e1b035558db890c9e30375147;hb=8f4c996fc32087955e6def30e669ba6d27cec11e;hp=d4de35ea067c4a7c3a9a46ceac57f4cf1086a19a;hpb=ea4f2bd39dcfabb23e86b2f79149c6c4038ff3cd;p=git.git diff --git a/t/t2203-add-intent.sh b/t/t2203-add-intent.sh index d4de35ea0..58a329961 100755 --- a/t/t2203-add-intent.sh +++ b/t/t2203-add-intent.sh @@ -32,5 +32,33 @@ 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_tick && + git commit -a -m initial && + git reset --hard && + + echo xyzzy >rezrov && + echo frotz >nitfol && + git add rezrov && + git add -N nitfol && + test_must_fail git commit +' + +test_expect_success 'can commit with an unrelated i-t-a entry in index' ' + git reset --hard && + echo xyzzy >rezrov && + echo frotz >nitfol && + git add rezrov && + git add -N nitfol && + git commit -m partial rezrov +' + +test_expect_success 'can "commit -a" with an i-t-a entry' ' + git reset --hard && + : >nitfol && + git add -N nitfol && + git commit -a -m all +' + test_done