summaryrefslogtreecommitdiff
path: root/builtin/add.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-11-21 22:57:45 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-11-21 22:57:45 +0900
commitca211f9c9d1118060ecaa8073654af9f1e2f5258 (patch)
tree5bc0e5f04a40588784367f70f9ad0a48c3e8275c /builtin/add.c
parentMerge branch 'en/rerere-multi-stage-1-fix' into maint (diff)
parentadd: do not accept pathspec magic 'attr' (diff)
downloadtgif-ca211f9c9d1118060ecaa8073654af9f1e2f5258.tar.xz
Merge branch 'nd/attr-pathspec-fix' into maint
"git add ':(attr:foo)'" is not supported and is supposed to be rejected while the command line arguments are parsed, but we fail to reject such a command line upfront. * nd/attr-pathspec-fix: add: do not accept pathspec magic 'attr'
Diffstat (limited to 'builtin/add.c')
-rw-r--r--builtin/add.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/add.c b/builtin/add.c
index 9916498a29..0b64bcdebe 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -454,7 +454,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
* Check the "pathspec '%s' did not match any files" block
* below before enabling new magic.
*/
- parse_pathspec(&pathspec, 0,
+ parse_pathspec(&pathspec, PATHSPEC_ATTR,
PATHSPEC_PREFER_FULL |
PATHSPEC_SYMLINK_LEADING_PATH,
prefix, argv);