Merge branch 'jw/git-add-attr-pathspec'
"git add" and "git stash" learned to support the ":(attr:...)" magic pathspec. * jw/git-add-attr-pathspec: attr: enable attr pathspec magic for git-add and git-stash
This commit is contained in:
@ -424,7 +424,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, PATHSPEC_ATTR,
|
||||
parse_pathspec(&pathspec, 0,
|
||||
PATHSPEC_PREFER_FULL |
|
||||
PATHSPEC_SYMLINK_LEADING_PATH,
|
||||
prefix, argv);
|
||||
@ -433,7 +433,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
|
||||
if (pathspec.nr)
|
||||
die(_("'%s' and pathspec arguments cannot be used together"), "--pathspec-from-file");
|
||||
|
||||
parse_pathspec_file(&pathspec, PATHSPEC_ATTR,
|
||||
parse_pathspec_file(&pathspec, 0,
|
||||
PATHSPEC_PREFER_FULL |
|
||||
PATHSPEC_SYMLINK_LEADING_PATH,
|
||||
prefix, pathspec_from_file, pathspec_file_nul);
|
||||
@ -504,7 +504,8 @@ int cmd_add(int argc, const char **argv, const char *prefix)
|
||||
PATHSPEC_LITERAL |
|
||||
PATHSPEC_GLOB |
|
||||
PATHSPEC_ICASE |
|
||||
PATHSPEC_EXCLUDE);
|
||||
PATHSPEC_EXCLUDE |
|
||||
PATHSPEC_ATTR);
|
||||
|
||||
for (i = 0; i < pathspec.nr; i++) {
|
||||
const char *path = pathspec.items[i].match;
|
||||
|
Reference in New Issue
Block a user