Subject: Re: [PATCH] rebase -i: remove CHERRY_PICK_HEAD when cherry-pick failed

From: Andrew Wong <[email-masked]>
Date: Tue, 03 Apr 2012 19:11:25 -0400

On 04/03/2012 05:26 PM, Jonathan Nieder wrote:
> The current CHERRY_PICK_HELP codepath removes CHERRY_PICK_HEAD to let
> its caller take care of the appropriate "commit -c" magic for
> historical reasons.  I'd be happy to see "rebase -i" stop relying on
> that.
>   
"rebase -i" doesn't rely on "commit -c". It stores the author info
inside its state dir, so when the user does a "rebase --continue", the
author info from the state dir is used.

Also, "commit -c" does override CHERRY_PICK_HEAD for author info and
message. So having CHERRY_PICK_HEAD around shouldn't affect scripts that
rely on "commit -c".

> Unfortunately, outside scripts from before CHERRY_PICK_HEAD existed
> are also allowed to use CHERRY_PICK_HELP,so the incomplete
> implementation that leaves behind a CHERRY_PICK_HEAD when the commit
> being cherry-picked resolves into nothingness is still a bug.
>   
CHERRY_PICK_HELP was introduced as a hack to allow "rebase -i" to
override what message "cherry-pick" shows, and not as something that
affects the behavior of "cherry-pick". Since it is also not documented,
it feels more like an internal implementation detail. So I suspect not
many people know about this env var and even fewer would actually use it.