Ramkumar Ramachandra <[email protected]> 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 <[email protected]>
> Signed-off-by: Junio C Hamano <[email protected]>
> ---
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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html