summaryrefslogtreecommitdiffstats
path: root/builtin
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--builtin/merge.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/builtin/merge.c b/builtin/merge.c
index e0a3299e92..3c4f415d87 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -1682,12 +1682,12 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
* tree in the index -- this means that the index must be in
* sync with the head commit. The strategies are responsible
* to ensure this.
+ *
+ * Stash away the local changes so that we can try more than one
+ * and/or recover from merge strategies bailing while leaving the
+ * index and working tree polluted.
*/
- if (use_strategies_nr == 1 ||
- /*
- * Stash away the local changes so that we can try more than one.
- */
- save_state(&stash))
+ if (save_state(&stash))
oidclr(&stash);
for (i = 0; !merge_was_ok && i < use_strategies_nr; i++) {