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
This commit is contained in:
Junio C Hamano
2013-09-09 14:50:42 -07:00
4 changed files with 5 additions and 16 deletions

View File

@ -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,