diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-09-09 14:50:42 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-09-09 14:50:44 -0700 |
commit | fadf96abaa5f42c4bb7b4b5017926779c23d8ef3 (patch) | |
tree | c2999c9aafd8071d01cabfd16d152cd20e437e11 /builtin/add.c | |
parent | af226bf01e99043f5f3d8bc09ad302d17e0de757 (diff) | |
parent | 625c3304e200f9bdc05626be1397311faa4962ba (diff) | |
download | git-fadf96abaa5f42c4bb7b4b5017926779c23d8ef3.tar.gz |
Merge branch 'nd/magic-pathspec'
Use "struct pathspec" interface in more places, instead of array of
characters, the latter of which cannot express magic pathspecs
(e.g. ":(icase)makefile" that matches both Makefile and makefile).
* nd/magic-pathspec:
add: lift the pathspec magic restriction on "add -p"
pathspec: catch prepending :(prefix) on pathspec with short magic
Diffstat (limited to 'builtin/add.c')
-rw-r--r-- | builtin/add.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/builtin/add.c b/builtin/add.c index ae0bdc78bb..31ddabd994 100644 --- a/builtin/add.c +++ b/builtin/add.c @@ -270,13 +270,7 @@ int interactive_add(int argc, const char **argv, const char *prefix, int patch) { struct pathspec pathspec; - /* - * git-add--interactive itself does not parse pathspec. It - * simply passes the pathspec to other builtin commands. Let's - * hope all of them support all magic, or we'll need to limit - * the magic here. - */ - parse_pathspec(&pathspec, PATHSPEC_ALL_MAGIC & ~PATHSPEC_FROMTOP, + parse_pathspec(&pathspec, 0, PATHSPEC_PREFER_FULL | PATHSPEC_SYMLINK_LEADING_PATH | PATHSPEC_PREFIX_ORIGIN, |