X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=t%2Ft2107-update-index-basic.sh;h=fe2fb17102cdc17168ae2d683d7d51a0b3e3f3bc;hb=ec160ae12b0ae938ed5076b9f604e88976fc429c;hp=a6405d318d322b9e1f49e4762570a2c1f5371726;hpb=62bd0c01057b1cc47f4710090da4c84511f3cc3d;p=thirdparty%2Fgit.git diff --git a/t/t2107-update-index-basic.sh b/t/t2107-update-index-basic.sh index a6405d318d..fe2fb17102 100755 --- a/t/t2107-update-index-basic.sh +++ b/t/t2107-update-index-basic.sh @@ -48,4 +48,17 @@ test_expect_success '--cacheinfo does not accept gitlink null sha1' ' test_cmp expect actual ' +test_expect_success '--cacheinfo mode,sha1,path (new syntax)' ' + echo content >file && + git hash-object -w --stdin expect && + + git update-index --add --cacheinfo 100644 "$(cat expect)" file && + git rev-parse :file >actual && + test_cmp expect actual && + + git update-index --add --cacheinfo "100644,$(cat expect),elif" && + git rev-parse :elif >actual && + test_cmp expect actual +' + test_done