diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-12-01 09:04:37 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-01 09:04:37 -0800 |
commit | 3c3e5d0ea2158bdc4f2244adff08504e50653d7c (patch) | |
tree | 287ce5f51018446e1a3669dd39b96fdbfdb157a5 /builtin/stash.c | |
parent | Merge branch 'nn/doc-rebase-merges' (diff) | |
parent | stash: make sure we have a valid index before writing it (diff) | |
download | tgif-3c3e5d0ea2158bdc4f2244adff08504e50653d7c.tar.xz |
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/stash.c')
-rw-r--r-- | builtin/stash.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/builtin/stash.c b/builtin/stash.c index d913487a43..4ad3adf4ba 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; /* |