Best practices for merging?

Jan Stolarek jan.stolarek at p.lodz.pl
Mon Feb 1 14:44:55 UTC 2016


> If there are multiple commits then a merge commit can serve to logically
> group them.
The cost of this is non-linear history. But I am still not sure what the actual benefit is? If the 
commits come one after another they are still logically grouped, with or without a merge commit.

I also wonder what is the preferred way of viewing history for most of the people. I either use 
`git log` or github, but rarely resort to gitk. Only the latter makes the non-linear commits 
explicitly visible. The former two just collapse everything into a linear history and is such a 
setting merge commits are a major clutter. So perhaps that's why I don't like them. Perhaps 
people who tend to use gitk are more keen on merge commits?

Janek


> For instance, in the case of Geoff's recent fix, 
>
>     $ git log --graph --oneline origin/master
>     * e5a0a89 Suppress substitution assertions to fix tests
>     * a883c1b Missing @since annotations in GHC.Generics
>     * f8e2b7e Minor doc fixes to GHC.Generics
>     * 34519f0 When encountering a duplicate symbol, show source of the
> first symbol *   669cbef Fix Trac issue #11487.
>
>     |\
>     | * 6544f8d Properly track live registers when saving the CCCS.
>     | * 90f688e Code formatting cleanup.
>     | * 4d0e4fe Add type signatures.
>     |/
>
>     * b61f5f7 Put docs in /usr/share/doc/ghc-<version>
>
> Here we see that those three commits were developed on a feature branch,
> which was then merged into master in 669cbef.
>
> For what it's worth I quite like this practice. That being said, in GHC
> we rarely have changes broken up into multiple commits like this, in
> part due to Phab's poor support for fine-grained changes.
>
> Cheers,
>
> - Ben


---
Politechnika Łódzka
Lodz University of Technology

Treść tej wiadomości zawiera informacje przeznaczone tylko dla adresata.
Jeżeli nie jesteście Państwo jej adresatem, bądź otrzymaliście ją przez pomyłkę
prosimy o powiadomienie o tym nadawcy oraz trwałe jej usunięcie.

This email contains information intended solely for the use of the individual to whom it is addressed.
If you are not the intended recipient or if you have received this message in error,
please notify the sender and delete it from your system.


More information about the ghc-devs mailing list