Subject: Re: configuring cherry-pick to always use -x?

From: Adam Monsen <[email-masked]>
Date: Mon, 14 Feb 2011 13:50:20 -0800

Junio C Hamano wrote:
> could you please justify in what workflow it would make sense to use
> -x most of the time?

Sure. Summary: two long-lived publicly visible branches.

Details:
Mifos is what I'm usually working on lately. We have branches "master"
and "f-release" both present in our public git repository called "head"
(hosted at sf.net). master is the bleeding edge of development,
f-release is a release maintenance branch recently created off the tip
of master. I expect both to live on forever (even though commits to
f-release will eventually cease).

Right after f-release was cut, we merged f-release to master every day
or so to make sure bugfixes for f-release were also propagated to future
releases. After a while, merging resulted in too many conflicts and we
started cherry picking instead.

This process is described generally at
http://mifosforge.jira.com/wiki/display/MIFOS/Release+Branch+Merging+Policy
.

If the source commit is present in the log message of the new (cherry
picked) commit, it's easy to (1) find the source commit (gitweb creates
a hyperlink, for instance) and (2) know that, when viewing the log of
master, a particular commit is also present on another branch. Right now
I just keep reminding folks to use -x.

For (2), I generally assume that branch is a release branch, but come to
think of it, it would be nice to know what branch a commit was cherry
picked from. For example: "(cherry picked from BRANCHNAME commit
c6e08938e352f3ec99a29a67dd192945d2bcf00d)" would be better than the
current message generated by -x.

See also:
http://mifosforge.jira.com/wiki/display/MIFOS/Mifos+Version+Control+Guide