Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-08-04 23:28:54 +0300
committerJunio C Hamano <gitster@pobox.com>2021-08-04 23:28:54 +0300
commit5fef3b15dbf609bdb13352d0eb716cd79c8ff017 (patch)
tree5be77acecb89de7a756c632ac2c1dd8fde4514a9 /builtin
parent1a6fb019d6c09f5e7e2b76fab2a6ad50a8506461 (diff)
parente082631e51ebe2c7ee6756a3b45d10732a6480df (diff)
Merge branch 'pb/merge-autostash-more'
The local changes stashed by "git merge --autostash" were lost when the merge failed in certain ways, which has been corrected. * pb/merge-autostash-more: merge: apply autostash if merge strategy fails merge: apply autostash if fast-forward fails Documentation: define 'MERGE_AUTOSTASH' merge: add missing word "strategy" to a message
Diffstat (limited to 'builtin')
-rw-r--r--builtin/merge.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/merge.c b/builtin/merge.c
index 7ad85c044a..22f23990b3 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -1561,6 +1561,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
&head_commit->object.oid,
&commit->object.oid,
overwrite_ignore)) {
+ apply_autostash(git_path_merge_autostash(the_repository));
ret = 1;
goto done;
}
@@ -1709,6 +1710,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
else
fprintf(stderr, _("Merge with strategy %s failed.\n"),
use_strategies[0]->name);
+ apply_autostash(git_path_merge_autostash(the_repository));
ret = 2;
goto done;
} else if (best_strategy == wt_strategy)
@@ -1716,7 +1718,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
else {
printf(_("Rewinding the tree to pristine...\n"));
restore_state(&head_commit->object.oid, &stash);
- printf(_("Using the %s to prepare resolving by hand.\n"),
+ printf(_("Using the %s strategy to prepare resolving by hand.\n"),
best_strategy);
try_merge_strategy(best_strategy, common, remoteheads,
head_commit);