diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-09-18 19:31:59 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-09-21 09:17:02 -0700 |
commit | 84d938b732242e81ec68647994070eb7c34d061f (patch) | |
tree | 2179095e9c8dcf8872129f962dd4a15204005693 /t/t6135-pathspec-with-attrs.sh | |
parent | Git 2.15.2 (diff) | |
download | tgif-84d938b732242e81ec68647994070eb7c34d061f.tar.xz |
add: do not accept pathspec magic 'attr'
Commit b0db704652 (pathspec: allow querying for attributes -
2017-03-13) adds new pathspec magic 'attr' but only with
match_pathspec(). "git add" has some pathspec related code that still
does not know about 'attr' and will bail out:
$ git add ':(attr:foo)'
fatal: BUG:dir.c:1584: unsupported magic 40
A better solution would be making this code support 'attr'. But I
don't know how much work is needed (I'm not familiar with this new
magic). For now, let's simply reject this magic with a friendlier
message:
$ git add ':(attr:foo)'
fatal: :(attr:foo): pathspec magic not supported by this command: 'attr'
Update t6135 so that the expected error message is from the
"graceful" rejection codepath, not "oops, we were supposed to reject
the request to trigger this magic" codepath.
Reported-by: smaudet@sebastianaudet.com
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/t6135-pathspec-with-attrs.sh')
-rwxr-xr-x | t/t6135-pathspec-with-attrs.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t6135-pathspec-with-attrs.sh b/t/t6135-pathspec-with-attrs.sh index 77b8cef661..e436a73962 100755 --- a/t/t6135-pathspec-with-attrs.sh +++ b/t/t6135-pathspec-with-attrs.sh @@ -166,7 +166,7 @@ test_expect_success 'fail if attr magic is used places not implemented' ' # though, but git-add is convenient as it has its own internal pathspec # parsing. test_must_fail git add ":(attr:labelB)" 2>actual && - test_i18ngrep "unsupported magic" actual + test_i18ngrep "magic not supported" actual ' test_expect_success 'abort on giving invalid label on the command line' ' |