diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-04-08 11:59:27 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-04-08 11:59:27 -0700 |
commit | b5a52fa6c694c891a259233b29eb0ef4a47db57b (patch) | |
tree | 58fcebb324b516f3076589ff77519c8733b9f75b /t | |
parent | bdb830c44567ebbdec497e6af21b87d4e43539cc (diff) | |
parent | b6c2a0d45d4165dfd326bd7a28e66d9cedb8ae84 (diff) | |
download | git-b5a52fa6c694c891a259233b29eb0ef4a47db57b.tar.gz |
Merge branch 'jc/rev-parse-argh-dashed-multi-words'
Make sure that the help text given to describe the "<param>" part
of the "git cmd --option=<param>" does not contain SP or _,
e.g. "--gpg-sign=<key-id>" option for "git commit" is not spelled
as "--gpg-sign=<key id>".
* jc/rev-parse-argh-dashed-multi-words:
parse-options: make sure argh string does not have SP or _
update-index: teach --cacheinfo a new syntax "mode,sha1,path"
parse-options: multi-word argh should use dash to separate words
Diffstat (limited to 't')
-rwxr-xr-x | t/t2107-update-index-basic.sh | 13 |
1 files changed, 13 insertions, 0 deletions
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 <file >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 |