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

Re: [PATCH] cherry-pick: No advice to commit if --no-commit

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Feb 21, 2012, 22:23 UTC
Message-ID
<20120221222049.GA31934@burratino>
In-Reply-To
<1329858317-3066-1-git-send-email-hordp@cisco.com>
Hi Phil,
Phil Hord wrote:
> Signed-off-by: Phil Hord <hordp@cisco.com>
Thanks.
> +++ b/sequencer.c
[...]
Show 12 quoted lines
> @@ -138,10 +138,12 @@ static void print_advice(int show_hint)
>  		return;
>  	}
>  
> -	if (show_hint)
> +	if (show_hint) {
>  		advise(_("after resolving the conflicts, mark the corrected paths\n"
> -			 "with 'git add <paths>' or 'git rm <paths>'\n"
> -			 "and commit the result with 'git commit'"));
> +			 "with 'git add <paths>' or 'git rm <paths>'"));
> +		if (!opts->no_commit)
> +			advise(_( "and commit the result with 'git commit'"));

"cherry-pick --no-commit" was not about to commit, but the user might have been. I think the hint is intended to convey that authorship will be correctly preserved if the user continues with "git commit" and no special -c option is necessary.

Could you say a little more about the motivation for this patch? For example, did the existing message confuse someone, or was it grating in the context of some particular workflow?

A smaller detail: splitting the message into two like this gives translators less control over how to phrase the message and where to wrap lines. Luckily that is easy to fix with

	if (opts->no_commit)
		advise(...);
	else
		advise(...);

which means more flexibility in phrasing the message with pertinent advice for each case. ;-)

Ciao, Jonathan

Previous: Phil HordNext: Junio C Hamano
Message 2 of 4 in “cherry-pick: No advice to commit if --no-commit”
  1. cherry-pick: No advice to commit if --no-commitPhil Hord, Feb 21, 2012
  2. Jonathan NiederFeb 21, 2012
  3. Junio C HamanoFeb 21, 2012
  4. Phil HordFeb 22, 2012

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.