Robert Bradshaw <
robe...@gmail.com> writes:
> On Sun, Nov 17, 2013 at 9:29 AM, Keshav Kini <
kesha...@gmail.com> wrote:
>> Volker Braun <
vbrau...@gmail.com> writes:
>>
>>> The order of parents doesn't matter for Sage. Its only important for
>>> you if you want to use the HEAD^1 (or just HEAD^) and HEAD^2 syntax
>>> to refer to the first and second parent...
>>
>> IMHO this is actually very important at the release manager stage.
>> Walking up the tree from master following HEAD^1 at each step should
>> give you a concise history of merged tickets. In order to ensure this
>> is the case, the release manager should always do `git merge --no-ff`
>> when merging tickets. This is the discipline IPython enforced on their
>> repository and it has worked quite well for them.
>
> Yes, the release manager (script) should take care of this.
OK, great!
>> What this means is that if you, as a ticket author, decide to merge your
>> ticket into master rather than master into your ticket, there's going to
>> be a sort of weird looking clump in the history graph when your ticket
>> is merged with --no-ff. You probably don't want to do this. Best
>> practice: ticket author merges master into their ticket branch,
>> maintainer merges ticket branches into master.
>
> Could you clarify with an example? It'll all happen within the
> ticket-specific branch.
You're right, sorry. I was imagining a slightly more convoluted release
management process (wrt to git) than was necessary. Indeed it will look
more or less the same on the first-parent spine of master.
Still, though, I think it's good practice to merge things into
the branch you've been working on, rather than merge the branch you've
been working on into other things and then move your branch pointer to
the result. When someone is browsing git history and sees a merge
commit, they would typically expect the first parent to point backwards
along the sort of "main line" of the branch that whoever made the commit
was working on. If that is not the case, navigation can be kind of
confusing.
This kind of assumption is also visible on github, for example, in the
Network view -- the first parent is typically shown as connected to the
merge commit by a solid line, whereas the second parent has an angled
arrow pointing at the merge commit (to show that it was sort of "merged
in" to an existing line of commits).
-Keshav