diff options
author | 2017-06-24 15:29:30 -0700 | |
---|---|---|
committer | 2017-06-24 15:29:30 -0700 | |
commit | c4db75f275327a9e0fe0b62096a6a7e5220bb041 (patch) | |
tree | f9d74474e2ce60ba05d32562bbbf87fdd81ecfc6 /git-stash.sh | |
parent | Merge branch 'ls/github' into maint (diff) | |
parent | git-stash: fix pushing stash with pathspec from subdir (diff) | |
download | tgif-c4db75f275327a9e0fe0b62096a6a7e5220bb041.tar.xz |
Merge branch 'ps/stash-push-pathspec-fix' into maint
"git stash push <pathspec>" did not work from a subdirectory at all.
Bugfix for a topic in v2.13
* ps/stash-push-pathspec-fix:
git-stash: fix pushing stash with pathspec from subdir
Diffstat (limited to 'git-stash.sh')
-rwxr-xr-x | git-stash.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/git-stash.sh b/git-stash.sh index 2fb651b2b8..e7b85932d6 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -19,6 +19,7 @@ OPTIONS_SPEC= START_DIR=$(pwd) . git-sh-setup require_work_tree +prefix=$(git rev-parse --show-prefix) || exit 1 cd_to_toplevel TMP="$GIT_DIR/.git-stash.$$" @@ -273,6 +274,8 @@ push_stash () { shift done + eval "set $(git rev-parse --sq --prefix "$prefix" -- "$@")" + if test -n "$patch_mode" && test -n "$untracked" then die "$(gettext "Can't use --patch and --include-untracked or --all at the same time")" |