diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-06-27 09:19:58 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-06-27 09:19:58 -0700 |
| commit | 6c0bfce914f951d673af91f0cad733b0d465fafb (patch) | |
| tree | a706b53af1a3cc7d333bb9fb278c90f158ae5db9 /builtin/merge.c | |
| parent | 1e1586e4ed626bde864339c10570bc0e73f0ab97 (diff) | |
| parent | 2e5a63659301c46544fdb3c3e7a69b4693a2c384 (diff) | |
Merge branch 'kz/merge-fail-early-upon-refresh-failure'
When "git merge" sees that the index cannot be refreshed (e.g. due
to another process doing the same in the background), it died but
after writing MERGE_HEAD etc. files, which was useless for the
purpose to recover from the failure.
* kz/merge-fail-early-upon-refresh-failure:
merge: avoid write merge state when unable to write index
Diffstat (limited to 'builtin/merge.c')
| -rw-r--r-- | builtin/merge.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/merge.c b/builtin/merge.c index fb3eb15b89..888166d604 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -703,7 +703,7 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common, if (repo_refresh_and_write_index(the_repository, REFRESH_QUIET, SKIP_IF_UNCHANGED, 0, NULL, NULL, NULL) < 0) - return error(_("Unable to write index.")); + die(_("Unable to write index.")); if (!strcmp(strategy, "recursive") || !strcmp(strategy, "subtree") || !strcmp(strategy, "ort")) { |
