diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2013-07-14 15:36:07 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-07-15 10:56:09 -0700 |
commit | a16bf9dd745a9e43e46d745d850db49358430e46 (patch) | |
tree | 695984bd7293ae822c6e9de91a059b0d6e1c9934 /t/t6130-pathspec-noglob.sh | |
parent | 5c6933d201fab183a9779dca0fe43bf2f1eca098 (diff) | |
download | git-a16bf9dd745a9e43e46d745d850db49358430e46.tar.gz git-a16bf9dd745a9e43e46d745d850db49358430e46.tar.xz |
pathspec: make --literal-pathspecs disable pathspec magic
--literal-pathspecs and its equivalent environment variable are
probably used for scripting. In that setting, pathspec magic may be
unwanted. Disabling globbing in individual pathspec can be done via
:(literal) magic.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6130-pathspec-noglob.sh')
-rwxr-xr-x | t/t6130-pathspec-noglob.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t6130-pathspec-noglob.sh b/t/t6130-pathspec-noglob.sh index 49c148e17..8551b026d 100755 --- a/t/t6130-pathspec-noglob.sh +++ b/t/t6130-pathspec-noglob.sh @@ -77,6 +77,12 @@ test_expect_success 'no-glob option matches literally (bracket)' ' test_cmp expect actual ' +test_expect_success 'no-glob option disables :(literal)' ' + : >expect && + git --literal-pathspecs log --format=%s -- ":(literal)foo" >actual && + test_cmp expect actual +' + test_expect_success 'no-glob environment variable works' ' echo star >expect && GIT_LITERAL_PATHSPECS=1 git log --format=%s -- "f*" >actual && |