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
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user