From: Junio C Hamano Date: Tue, 27 Nov 2007 01:25:38 GMT Subject: Re: Rebase/cherry-picking idea Message-ID: <7vhcj8eay5.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20071127010801.GF14735@spearce.org> "Shawn O. Pearce" writes: > So I guess we could rename those two "internal" environment variables > to use a leading _ to make them different from "user level" variables, > but why change them now? I really don't see a compelling reason to > break that part of the "API" between porcelain/plumbing. I don't either, which means I do not see a compelling reason to have underscore in front of that cherry-pick message environment either. About the patch itself, I think replacing the whole message, not just "and commit the result." part, might make more sense. help_message = getenv("_GIT_CHERRY_PICK_HELP"); fprintf(stderr, "Automatic %s failed. " "After resolving the conflicts,\n" "mark the corrected paths with 'git add ' " "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, ... Some other caller can be written to guide the user resolving and do the "git add" part for the user, and "mark the corrected paths with 'git add '" may not suit the need for such a caller. Which would mean: help_message = getenv("GIT_CHERRY_PICK_HELP"); if (!help_message) { static char helpbuf[1024]; help_message = helpbuf; sprintf(help_message, " After resolving the conflits,\n" "mark the corrected paths with 'git add ' " "and commit the result.\n" "When commiting, use the option " "'-c %s' to retain authorship and message.\n", find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV)); } fprintf(stderr, "Automatic %s failed.%s", help_message); exit(1); But I do not care too deeply either way.