[bind10-dev] Order of merging

Michal 'vorner' Vaner michal.vaner at nic.cz
Wed Jan 23 12:16:34 UTC 2013


Hello

On Wed, Jan 23, 2013 at 11:13:41AM +0000, Stephen Morris wrote:
> > Also, if we ever want to employ some script to extract changelog
> > from the merges to master, it would be easier if the master always
> > followed on the first parent, eg. on the left.
> 
> How likely is this?  We already maintain a separate change log, as not
> every change to master requires a entry.  Besides, if we were to do
> that we should also use --squash when merging into master so as to
> remove the clutter of intermediate commits.

We talked about it a week ago on the call. The idea was to have a NEWS file that
would something similar to what we have now (manually maintained file of
important and interesting changes), while the changelog would be auto-generated.
This is (according to Mukund) more usual than what we do.

Please, no squash! I indeed wanted to extract only the merges, with the `git log
--merges` parameter. That skips the other commits.

> Having said that, perhaps a solution that satisfies both preferences is:
> 
> $ git checkout tracXXXX
> $ git merge master
> $ git checkout master
> $ git merge --no-ff tracXXXX
> 
> The last command will force a new commit into master, even if one were
> not necessary, so simulating the effect of directly merging the branch
> into it.

But the last commit will not have two parents, only one. That means it is not a
merge and the order of branches would still be reversed.

But what would work is this:
$ git checkout master -b tmp       # Create a temporary branch for the merge
$ git merge tracXXXX
# Resolve conflicts, if any.
$ git checkout master
$ git merge tmp                    # fast-forward
$ git pull
$ git push origin master :tracXXXX
$ git branch -d tmp tracXXXX

You'd be on a copy of master to do the merge (so safer and separated), but you'd
still do it in the right order. Then the fast-forward would just put the commit
onto the master branch.

What about that?

With regards

-- 
BOFH Excuse #452:
Somebody ran the operating system through a spelling checker.

Michal 'vorner' Vaner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <https://lists.isc.org/pipermail/bind10-dev/attachments/20130123/a4f84783/attachment.bin>


More information about the bind10-dev mailing list