fixup! stash: avoid unnecessary reset_tree() call

In preparation for a newer patch series.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2019-03-11 16:36:11 +01:00
parent 65de8ee891
commit 41fef97f02

View File

@@ -404,7 +404,7 @@ static int do_apply_stash(const char *prefix, struct stash_info *info,
if (refresh_cache(REFRESH_QUIET))
return -1;
if (write_cache_as_tree(&c_tree, 0, NULL))
if (write_cache_as_tree(&c_tree, 0, NULL) || reset_tree(&c_tree, 0, 0))
return error(_("cannot apply a stash in the middle of a merge"));
if (index) {