RE: disallowing non-trivial merges on integration branches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



My two cents:

* Rebase is evil (grab your pitchforks!).

* One thing that I have found is that if you fetch/merge --no-ff in the authoritative repo, then you actually end up with a better graph.  Why?  If you allow fast-forward to the contributor, then in the case of a trivial merge on the contributor branch, the contributor will have merged master *into* the contributor branch, making the contributor the left-parent, and the master the right-parent.  If you 'merge --no-ff', then you insure that in the merge on master, the left-parent is master, and the right-parent is your contributor.  Then, you should be able to follow left-parents to trace your mainline.  Not sure if that would help your gitk graph.

* It sounds like you have a problem following the merges.  Maybe the grapher needs to be enhanced?

-- 
-Justin


-----Original Message-----
From: git-owner@xxxxxxxxxxxxxxx [mailto:git-owner@xxxxxxxxxxxxxxx] On Behalf Of Adam Monsen
Sent: Wednesday, December 15, 2010 1:27 PM
To: git@xxxxxxxxxxxxxxx
Subject: disallowing non-trivial merges on integration branches

Does anyone have or want to help with a hook script to prevent trivial merges?

Here's some context:

I'm using the phrase "trivial merge" to refer to a merge without conflicts, 
like, when two distinct files are edited.

In the Mifos project, the "head" repo at sf.net--for all intents and purposes--
is the authoritative place to find Mifos source code. At my request, many of the 
devs pushing to "head" have started using rebase more often than merge when 
their local copy of a branch diverges from the corresponding remote[1] (for 
example, I commit to my "master", but must fetch then merge or rebase before 
pushing to origin/master). Liberal use of rebase has really cleaned up our 
version history graph... it's much easier to see what was pushed and when, and 
the progression of patches. Trivial merges just don't add anything helpful to 
the commit history graph, IMHO. Non-trivial merges are of course still allowed. 
Rebasing commits extant in the "head" repo at sf.net is disallowed.

I've been working on a hook script[2] to disallow trivial merges to further 
enforce our policy. Well, really I'm just working on the test suite[3], another 
guy (also named Adam, coincidentally) is working on the hook script.

A blocking bug with the hook script (might be a design flaw) is that it prevents 
non-trivial merges.

Wanna help fix it?

I don't understand the hook script... is it doing something that makes sense?

This was my first time writing a test harness in Bash script. Kinda fun, 
actually. Git certainly lends well to scripting, and it feels intentional. Good 
stuff.

References (links) from the above email:
1. http://article.gmane.org/gmane.comp.finance.mifos.devel/9597
2. http://stackoverflow.com/questions/4138285
3. https://gist.github.com/737842

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]