]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-stash.sh
is_ntfs_dotgit: use a size_t for traversing string
[thirdparty/git.git] / git-stash.sh
index 2fb651b2b8d9d91a130b1cbd11c3c2b6b1cf961b..e7b85932d6ba62ec9f581c692a321ac24e52dcac 100755 (executable)
@@ -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")"