On Mon, 8 May 2006, Junio C Hamano wrote: > "Bertrand Jacquin" <beber.mailing@xxxxxxxxx> writes: > > > But I would like to send an email after merge to inform people that: > > > > o tree ``a'' and ``b'' have been merged. > > o made by John Doe at a time > > o show a diffstat. > > o show a --short-log=oneline from merge base. > > Forgetting about a fast-forward merge, (1) and (2) are > available in the commit header and the commit log, so is (4) if > you enable merge.summary configuration like Linus does in his > kernel repository. NOTE! Please don't enable "merge.summary" if you ever merge from the upstream tree. That just looks ugly. Your merge messages will be just filled with crap that has nothing to do with your tree - and everything to do with all the _unrelated_ normal development that happened in the tree. So in general, "merge.summary" makes sense only for trees that pull from downstreams, and never merge with anything upstream. My tree obviously does that for the kernel. Think of it as a "top-level maintainer" flag, although it works find also for sub-maintainers as long as they synchronize upwards _purely_ by being pulled from, not by pulling. But if you want to get it for any random merges, you can always just do git log -11 --pretty=oneline ^$commit^ $commit^@ | sed 's/[0-9a-f]* // ; 11 s/.*/\.\.\./' which will show up to the ten first commits that were merged (and turn the eleventh one, if it exists, into "..." - that's a pretty disgusting trick to make it show when you left things out). That "^$commit^ $commit^@" part is important. It may look like some deranged git smiley, but it does exactly what you want it to do: take all the parents of the commit, but ignore any commit reachable from the first one (the "mainline" of the person who did the commit). The ^@ syntax is obviously pretty new, so it requires a modern git. Linus - : 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