summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-12-01 17:04:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-12-01 17:04:37 (GMT)
commit3c3e5d0ea2158bdc4f2244adff08504e50653d7c (patch)
tree287ce5f51018446e1a3669dd39b96fdbfdb157a5 /builtin
parent43c5fe1c1d9435b60277b38e8b52a29c635cff9a (diff)
parentdf53c80822735ddd30638ba77be3face438d5ad8 (diff)
downloadgit-3c3e5d0ea2158bdc4f2244adff08504e50653d7c.zip
git-3c3e5d0ea2158bdc4f2244adff08504e50653d7c.tar.gz
git-3c3e5d0ea2158bdc4f2244adff08504e50653d7c.tar.bz2
Merge branch 'tg/stash-refresh-index'
Recent update to "git stash pop" made the command empty the index when run with the "--quiet" option, which has been corrected. * tg/stash-refresh-index: stash: make sure we have a valid index before writing it
Diffstat (limited to 'builtin')
-rw-r--r--builtin/stash.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/builtin/stash.c b/builtin/stash.c
index d913487..4ad3adf 100644
--- a/builtin/stash.c
+++ b/builtin/stash.c
@@ -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;
/*