]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-legacy-stash.sh
stash: handle staged changes in skip-worktree files correctly
[thirdparty/git.git] / git-legacy-stash.sh
index f60e9b3e877b24e42431654e1de19911bdfc4f25..5398a5161d253e7ba0a70a76d46fadc4d702ce8d 100755 (executable)
@@ -193,7 +193,8 @@ create_stash () {
                        GIT_INDEX_FILE="$TMPindex" &&
                        export GIT_INDEX_FILE &&
                        git diff-index --name-only -z HEAD -- "$@" >"$TMP-stagenames" &&
-                       git update-index -z --add --remove --stdin <"$TMP-stagenames" &&
+                       git update-index --ignore-skip-worktree-entries \
+                               -z --add --remove --stdin <"$TMP-stagenames" &&
                        git write-tree &&
                        rm -f "$TMPindex"
                ) ) ||