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

Re: [PATCH] Replace misleading message during interactive rebasing

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Nov 28, 2007, 12:41 UTC
Message-ID
<Pine.LNX.4.64.0711281237250.27959@racer.site>
In-Reply-To
<47D3817B-AA0D-4949-99ED-C36611604D5E@wincent.com>
Hi,
On Wed, 28 Nov 2007, Wincent Colaiuta wrote:
Show 17 quoted lines
> @@ -352,11 +352,13 @@ static int revert_or_cherry_pick(int argc, const char
> **argv)
> 		}
> 		if (close(msg_fd) || commit_lock_file(&msg_file) < 0)
> 			die ("Error wrapping up %s", defmsg);
> +		help_message = getenv("_GIT_CHERRY_PICK_HELP");
> 		fprintf(stderr, "Automatic %s failed.  "
> 			"After resolving the conflicts,\n"
> 			"mark the corrected paths with 'git add <paths>' "
> -			"and commit the result.\n", me);
> -		if (action == CHERRY_PICK) {
> +			"and %s.\n", me,
> +			help_message ? help_message : "commit the result");
> +		if (action == CHERRY_PICK && !help_message) {
> 			fprintf(stderr, "When commiting, use the option "
> 				"'-c %s' to retain authorship and message.\n",
> 				find_unique_abbrev(commit->object.sha1,

What about Junio's remark that _GIT_CHERRY_PICK_HELP should rather replace the _complete_ message?

You could still provide the "me" and unique_abbrev parameters, so that the first %s in _GIT_CHERRY_PICK_HELP would be replaced by the operation, and the second by the sha1. Hmm?

Ciao, Dscho

Previous: Wincent ColaiutaNext: Johannes Sixt
Message 10 of 11 in “Replace misleading message during interactive rebasing”
  1. Replace misleading message during interactive rebasingWincent Colaiuta, Nov 26, 2007
  2. Johannes SixtNov 27, 2007
  3. Wincent ColaiutaNov 27, 2007
  4. Jeff KingNov 27, 2007
  5. Jakub NarebskiNov 27, 2007
  6. Jeff KingNov 27, 2007
  7. Jeff KingNov 27, 2007
  8. Junio C HamanoNov 28, 2007
  9. Wincent ColaiutaNov 28, 2007
  10. Johannes SchindelinNov 28, 2007
  11. Johannes SixtNov 28, 2007

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.