Subject: Re: hooks/post-receive-email bug?

From: Marc Branchaud <[email-masked]>
Date: Tue, 07 Jul 2009 11:14:13 -0400

Michael J Gruber wrote:
> 
> Why not read the hook script yourself... but see below.

Laziness, obviously!  :)

> I assume that by "pushing matching heads" you mean you did not create a
> topic branch on origin?

Right.  The push command pushed both merge commits to the origin, taking the topic commits along with them.

> The hook tries cleverly to avoid sending multiple commit mails for the
> same commit. The heuristics is not completely failsafe. It seems the
> hook thinks these commits have been dealt with already, which usually
> happens when they can be reached by other refs than the one being updated.

Thanks for confirming the issue.  Actually, I don't think the existence of a topic branch on the origin would've made a difference.  Like you say, the script ignores any commits reachable by any other branch.

It seems to me that the script might be able to keep track of which branches are being updated, and notice if two or more of them share commits.  But that may require a heavy rewrite...

One question: Is the reason the script sent two emails because git called it with two lines on stdin?  As in:
	C D master
	Y Z release

		M.