]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/stash.c
Merge branch 'ec/fetch-mark-common-refs-trace2'
[thirdparty/git.git] / builtin / stash.c
index 4e806176b0828b65cf405492ca2cd2d157e3fc4a..4ad3adf4ba5a01d78f75dfc59b7ee99b25880e0c 100644 (file)
@@ -483,13 +483,12 @@ static int do_apply_stash(const char *prefix, struct stash_info *info,
                if (ret)
                        return -1;
 
+               /* read back the result of update_index() back from the disk */
                discard_cache();
+               read_cache();
        }
 
-       if (quiet) {
-               if (refresh_and_write_cache(REFRESH_QUIET, 0, 0))
-                       warning("could not refresh index");
-       } else {
+       if (!quiet) {
                struct child_process cp = CHILD_PROCESS_INIT;
 
                /*
@@ -1088,8 +1087,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);