built-in stash: handle :(glob) pathspecs again
[git/git.git] / builtin / stash.c
index 1bfa240..2f29d03 100644 (file)
@@ -830,7 +830,7 @@ static void add_pathspecs(struct argv_array *args,
        int i;
 
        for (i = 0; i < ps.nr; i++)
-               argv_array_push(args, ps.items[i].match);
+               argv_array_push(args, ps.items[i].original);
 }
 
 /*
@@ -1466,7 +1466,8 @@ static int push_stash(int argc, const char **argv, const char *prefix)
                                     git_stash_push_usage,
                                     0);
 
-       parse_pathspec(&ps, 0, PATHSPEC_PREFER_FULL, prefix, argv);
+       parse_pathspec(&ps, 0, PATHSPEC_PREFER_FULL | PATHSPEC_PREFIX_ORIGIN,
+                      prefix, argv);
        return do_push_stash(ps, stash_msg, quiet, keep_index, patch_mode,
                             include_untracked);
 }