git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] status: suggest `git merge --continue`, not `git commit`

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 6, 2026, 18:20 UTC
Message-ID
<xmqq5wzeelmf.fsf@gitster.g>
In-Reply-To
<pull.2249.git.1791291762665.gitgitgadget@gmail.com>
"Julia Evans via GitGitGadget" <gitgitgadget@gmail.com> writes:
[Administrivia]
As you have
    cc: D. Ben Knoble" ben.knoble@gmail.com

at the end of your pull request that you gave to GitGitGadget, you ended up with a bogus Cc: address that reads

    "D. Ben Knoble <ben.knoble"@gmail.com>

you may want to help improving GGG by raising an issue to reject (or ignore) such a malformed address.

[end of administrivia]
Show 11 quoted lines
> diff --git a/t/t7060-wtstatus.sh b/t/t7060-wtstatus.sh
> index 942ddbbf0e..a9b435b5e3 100755
> --- a/t/t7060-wtstatus.sh
> +++ b/t/t7060-wtstatus.sh
> @@ -37,7 +37,7 @@ test_expect_success 'M/D conflict does not segfault' '
>  	cat >expect <<EOF &&
>  On branch side
>  You have unmerged paths.
> -  (fix conflicts and run "git commit")
> +  (fix conflicts and run "git merge --continue")
>    (use "git merge --abort" to abort the merge)

This message comes from show_merge_in_progress(), which is called only when the code is convinced that it is seeing an unmerged index due to a conflicted git merge. We can therefore make this message as merge-specific as we want. The suggestion to use 'git merge --abort' already does this.

Show 22 quoted lines
> diff --git a/wt-status.c b/wt-status.c
> index 57772c7501..f7b0dc29d5 100644
> --- a/wt-status.c
> +++ b/wt-status.c
> @@ -1273,7 +1273,7 @@ static void show_merge_in_progress(struct wt_status *s,
>  		status_printf_ln(s, color, _("You have unmerged paths."));
>  		if (s->hints) {
>  			status_printf_ln(s, color,
> -					 _("  (fix conflicts and run \"git commit\")"));
> +					 _("  (fix conflicts and run \"git merge --continue\")"));
>  			status_printf_ln(s, color,
>  					 _("  (use \"git merge --abort\" to abort the merge)"));
>  		}
> @@ -1282,7 +1282,7 @@ static void show_merge_in_progress(struct wt_status *s,
>  			_("All conflicts fixed but you are still merging."));
>  		if (s->hints)
>  			status_printf_ln(s, color,
> -				_("  (use \"git commit\" to conclude merge)"));
> +				_("  (use \"git merge --continue\" to conclude merge)"));
>  	}
>  	wt_longstatus_print_trailer(s);
>  }

We could tighten "You have unmerged paths." even further to indicate that these paths came from a conflicted 'git merge'. In the same file, show_cherry_pick_in_progress() and show_revert_in_progress() already provide instructions very specific to these commands. Since the message for 'git merge' is the oldest, it is not surprising that we did not update it when 'git merge --continue', the instructions for cherry-pick and revert, or 'git merge --abort' instruction were added to the system. This commit moves us belatedly in the right direction, and as always, it is better late than never.

The changes look good.  Thanks.
Previous: Phillip Wood
Message 3 of 3 in “status: suggest `git merge --continue`, not `git commit`”
  1. status: suggest `git merge --continue`, not `git commit`Julia Evans via GitGitGadget, Oct 6, 2026
  2. Phillip WoodOct 6, 2026
  3. Junio C HamanoOct 6, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.