All of lore.kernel.org
 help / color / mirror / Atom feed
* hooks/post-receive-email bug?
@ 2009-06-17 22:21 Marc Branchaud
  2009-07-06 14:49 ` Marc Branchaud
  0 siblings, 1 reply; 4+ messages in thread
From: Marc Branchaud @ 2009-06-17 22:21 UTC (permalink / raw)
  To: git list

Hi all,

We currently have two main development branches: master and release.  These branches exist on our shared git server.  I had to make a change in both branches, so I made a topic branch off of their merge-base and did the work:

  o--o--A--B--C		<-- origin/master
     |\
     | X--Y		<-- origin/release
      \
       1--2--3		<-- topic

I then merged topic into both master and release.  The merges were clean:

  o--o--A--B--C---D	<-- master
     |\           |
     | X--Y----Z /	<-- release
      \       / /
       1--2--3--	<-- topic

Then I did
	git push origin
to push matching refspecs to the origin repo.

port-receive-email sent two messages for that push, one for each branch.  Each message showed that commits 1, 2 and 3 were applied to the appropriate branch:

	The branch, release has been updated
	       via  hash for Z (commit)
	       via  hash for 3 (commit)
	       via  hash for 2 (commit)
	       via  hash for 1 (commit)
	      from  hash for Y (commit)

However, the details of the topic commits were missing from both messages.  Instead, both only contained the details of the merge commits D and Z.

I was expecting at least one of the messages to have the details of commits 1, 2 and 3.  Was I wrong to expect that?

Thanks,

		M.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: hooks/post-receive-email bug?
  2009-06-17 22:21 hooks/post-receive-email bug? Marc Branchaud
@ 2009-07-06 14:49 ` Marc Branchaud
  2009-07-07 13:33   ` Michael J Gruber
  0 siblings, 1 reply; 4+ messages in thread
From: Marc Branchaud @ 2009-07-06 14:49 UTC (permalink / raw)
  To: git list

Ping?

		M.


Marc Branchaud wrote:
> Hi all,
> 
> We currently have two main development branches: master and release. 
> These branches exist on our shared git server.  I had to make a change
> in both branches, so I made a topic branch off of their merge-base and
> did the work:
> 
>  o--o--A--B--C        <-- origin/master
>     |\
>     | X--Y        <-- origin/release
>      \
>       1--2--3        <-- topic
> 
> I then merged topic into both master and release.  The merges were clean:
> 
>  o--o--A--B--C---D    <-- master
>     |\           |
>     | X--Y----Z /    <-- release
>      \       / /
>       1--2--3--    <-- topic
> 
> Then I did
>     git push origin
> to push matching refspecs to the origin repo.
> 
> port-receive-email sent two messages for that push, one for each
> branch.  Each message showed that commits 1, 2 and 3 were applied to the
> appropriate branch:
> 
>     The branch, release has been updated
>            via  hash for Z (commit)
>            via  hash for 3 (commit)
>            via  hash for 2 (commit)
>            via  hash for 1 (commit)
>           from  hash for Y (commit)
> 
> However, the details of the topic commits were missing from both
> messages.  Instead, both only contained the details of the merge commits
> D and Z.
> 
> I was expecting at least one of the messages to have the details of
> commits 1, 2 and 3.  Was I wrong to expect that?
> 
> Thanks,
> 
>         M.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: hooks/post-receive-email bug?
  2009-07-06 14:49 ` Marc Branchaud
@ 2009-07-07 13:33   ` Michael J Gruber
  2009-07-07 15:14     ` Marc Branchaud
  0 siblings, 1 reply; 4+ messages in thread
From: Michael J Gruber @ 2009-07-07 13:33 UTC (permalink / raw)
  To: Marc Branchaud; +Cc: git list

Marc Branchaud venit, vidit, dixit 06.07.2009 16:49:
> Ping?
> 

Pong!

Why not read the hook script yourself... but see below.

> 		M.
> 
> 
> Marc Branchaud wrote:
>> Hi all,
>>
>> We currently have two main development branches: master and release. 
>> These branches exist on our shared git server.  I had to make a change
>> in both branches, so I made a topic branch off of their merge-base and
>> did the work:
>>
>>  o--o--A--B--C        <-- origin/master
>>     |\
>>     | X--Y        <-- origin/release
>>      \
>>       1--2--3        <-- topic
>>
>> I then merged topic into both master and release.  The merges were clean:
>>
>>  o--o--A--B--C---D    <-- master
>>     |\           |
>>     | X--Y----Z /    <-- release
>>      \       / /
>>       1--2--3--    <-- topic
>>
>> Then I did
>>     git push origin
>> to push matching refspecs to the origin repo.
>>
>> port-receive-email sent two messages for that push, one for each
>> branch.  Each message showed that commits 1, 2 and 3 were applied to the
>> appropriate branch:
>>
>>     The branch, release has been updated
>>            via  hash for Z (commit)
>>            via  hash for 3 (commit)
>>            via  hash for 2 (commit)
>>            via  hash for 1 (commit)
>>           from  hash for Y (commit)
>>
>> However, the details of the topic commits were missing from both
>> messages.  Instead, both only contained the details of the merge commits
>> D and Z.
>>
>> I was expecting at least one of the messages to have the details of
>> commits 1, 2 and 3.  Was I wrong to expect that?
>>
>> Thanks,
>>
>>         M.

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

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.

Michael

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: hooks/post-receive-email bug?
  2009-07-07 13:33   ` Michael J Gruber
@ 2009-07-07 15:14     ` Marc Branchaud
  0 siblings, 0 replies; 4+ messages in thread
From: Marc Branchaud @ 2009-07-07 15:14 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: git list

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-07 15:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-17 22:21 hooks/post-receive-email bug? Marc Branchaud
2009-07-06 14:49 ` Marc Branchaud
2009-07-07 13:33   ` Michael J Gruber
2009-07-07 15:14     ` Marc Branchaud

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.