Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-04-08 22:59:27 +0400
committerJunio C Hamano <gitster@pobox.com>2014-04-08 22:59:27 +0400
commitb5a52fa6c694c891a259233b29eb0ef4a47db57b (patch)
tree58fcebb324b516f3076589ff77519c8733b9f75b /t
parentbdb830c44567ebbdec497e6af21b87d4e43539cc (diff)
parentb6c2a0d45d4165dfd326bd7a28e66d9cedb8ae84 (diff)
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-xt/t2107-update-index-basic.sh13
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