]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/stash.c
stash: handle staged changes in skip-worktree files correctly
[thirdparty/git.git] / builtin / stash.c
index b5a301f24d7a5f8b0a5f7d51703ca4cf38e2109c..56f3b551e4af71c0ea1a82c676a24617f8234eaf 100644 (file)
@@ -1082,8 +1082,9 @@ static int stash_working_tree(struct stash_info *info, const struct pathspec *ps
        }
 
        cp_upd_index.git_cmd = 1;
-       argv_array_pushl(&cp_upd_index.args, "update-index", "-z", "--add",
-                        "--remove", "--stdin", NULL);
+       argv_array_pushl(&cp_upd_index.args, "update-index",
+                        "--ignore-skip-worktree-entries",
+                        "-z", "--add", "--remove", "--stdin", NULL);
        argv_array_pushf(&cp_upd_index.env_array, "GIT_INDEX_FILE=%s",
                         stash_index_path.buf);