Skip to content

Commit 61efc5c

Browse files
committed
Merge branch 'mm/status-suggest-merge-abort' into maint
"git status" learned to suggest "merge --abort" during a conflicted merge, just like it already suggests "rebase --abort" during a conflicted rebase. * mm/status-suggest-merge-abort: status: suggest 'git merge --abort' when appropriate
2 parents 00f27fe + b0a61ab commit 61efc5c

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

t/t7060-wtstatus.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ test_expect_success 'M/D conflict does not segfault' '
3434
On branch side
3535
You have unmerged paths.
3636
(fix conflicts and run "git commit")
37+
(use "git merge --abort" to abort the merge)
3738
3839
Unmerged paths:
3940
(use "git add/rm <file>..." as appropriate to mark resolution)
@@ -138,6 +139,7 @@ test_expect_success 'status when conflicts with add and rm advice (deleted by th
138139
On branch master
139140
You have unmerged paths.
140141
(fix conflicts and run "git commit")
142+
(use "git merge --abort" to abort the merge)
141143
142144
Unmerged paths:
143145
(use "git add/rm <file>..." as appropriate to mark resolution)
@@ -171,6 +173,7 @@ test_expect_success 'status when conflicts with add and rm advice (both deleted)
171173
On branch conflict_second
172174
You have unmerged paths.
173175
(fix conflicts and run "git commit")
176+
(use "git merge --abort" to abort the merge)
174177
175178
Unmerged paths:
176179
(use "git add/rm <file>..." as appropriate to mark resolution)
@@ -195,6 +198,7 @@ test_expect_success 'status when conflicts with only rm advice (both deleted)' '
195198
On branch conflict_second
196199
You have unmerged paths.
197200
(fix conflicts and run "git commit")
201+
(use "git merge --abort" to abort the merge)
198202
199203
Changes to be committed:
200204

t/t7512-status-help.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ test_expect_success 'status when conflicts unresolved' '
2929
On branch conflicts
3030
You have unmerged paths.
3131
(fix conflicts and run "git commit")
32+
(use "git merge --abort" to abort the merge)
3233
3334
Unmerged paths:
3435
(use "git add <file>..." to mark resolution)

wt-status.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -947,9 +947,12 @@ static void show_merge_in_progress(struct wt_status *s,
947947
{
948948
if (has_unmerged(s)) {
949949
status_printf_ln(s, color, _("You have unmerged paths."));
950-
if (s->hints)
950+
if (s->hints) {
951951
status_printf_ln(s, color,
952-
_(" (fix conflicts and run \"git commit\")"));
952+
_(" (fix conflicts and run \"git commit\")"));
953+
status_printf_ln(s, color,
954+
_(" (use \"git merge --abort\" to abort the merge)"));
955+
}
953956
} else {
954957
s-> commitable = 1;
955958
status_printf_ln(s, color,

0 commit comments

Comments
 (0)