Why does git merge have so much trouble with Fedora package branches?

Simo Sorce simo at redhat.com
Thu Nov 10 14:02:45 UTC 2011


On Thu, 2011-11-10 at 13:27 +0100, Michael J Gruber wrote:
> I'm sorry but the reason is that people don't know git workflows.

I guess it depends on what is the maintainer preferred workflow.

I personally hate git merge, especially for stuff so simple as fedora
trees. It gives no advantages I can see to the way I work and causes
quite a lot of bad side-issues.

[..]

> Tons of equivalent, but different patches. Only one non-equivalent
> patch. (What keeps one from saying which new upstream version...?) But
> by its very nature, a merge cannot "coalesce" different equivalent
> patches, only a rebase would. A merge gives conflicts because as
> compared to the fork point (merge base), both branches change the same
> lines in different ways (e.g. the sources file).
> 
> Mixing cherry-picks and merges almost inevitably leads to these
> problems.

True, that's why it would be *very* nice if the maintainer could decide
the policy and have git hooks on the server enforce it.

Ie if the maintainer does not want merges it should be possible for him
to save that information somewhere and then hoos would refuse a push
with merges.

> In this situation, cherry-picking b0b3121 from origin/f16 to master
> would have been the best fixup for the crappy history. After that,
> both
> diverging branches are "equivalent", and a merge from master to
> origin/f16 would have succeeded with the default recursive strategy
> and
> without any conflicts.

True.

> Hmm, do I sound like ranting? I hope not, or else sorry, I'd be
> barking
> up the wrong tree. In any case I hope this post helps.

Well it does sound a bit like ranting, but I think it is ok to some
degree.
Git is still a very new tool for many, and some package maintainers may
be using it only for fedora packaging.

Also there are basically opposite camps when it comes to deal with git
merge. People like me that avoid it like the plague on most of his
projects, and other people that love it.
I find git merge justified only on very bug projects that heavily use
feature branches, but in the end it is about maintainer comfort when it
comes to Fedora, IMHO.

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York



More information about the devel mailing list