From: Junio C Hamano Date: Tue, 18 Jun 2013 20:35:47 GMT Subject: Re: [PATCH v2 6/7] rebase: write better reflog messages Message-ID: <7va9mn40nw.fsf@alter.siamese.dyndns.org> In-Reply-To: <1371581737-10013-7-git-send-email-artagnon@gmail.com> Ramkumar Ramachandra writes: > Now that the "checkout" invoked internally from "rebase" knows to honor > GIT_REFLOG_ACTION, we can start to use it to write a better reflog > message when "rebase anotherbranch", "rebase --onto branch", > etc. internally checks out the new fork point. We will write: > > rebase: checkout master > > instead of the old > > rebase > > Signed-off-by: Ramkumar Ramachandra > Signed-off-by: Junio C Hamano > --- So the approach taken by this round is to change everybody's assumption so far that they can start from a clean and usable GIT_REFLOG_ACTION when creating their own message, and stop depending on what is left in GIT_REFLOG_ACTION. That would certainly allow this patch to leave whatever cruft in GIT_REFLOG_ACTION, because everybody else will now create the value to be assigned to that variable from scratch based on a new and different variable. All existing "everybody else" is converted to adjust to the new reality. A one-shot assignment "VAR=VAL git checkout" is sometimes cumbersome to arrange, especially when what calls the "git checkout" is wrapped in a shell function like "output", I think this is an OK approach. If we are adopting that convention, however, the new variable that holds the name of the overall program, base_reflog_action, needs to be a bit more prominently documented in the code, to let the other people know that is the new convention to follow. Something like... # Use this as the prefix when setting and exporting # GIT_REFLOG_ACTION variable. base_reflog_action=am And the fact that we are declaring the new convention and expecting everybody to stick to it should be in the log message. Thanks.