* Bug: post-receive-email sometimes misses commits
@ 2012-02-27 20:39 Michael Haggerty
2012-02-27 20:43 ` Michael Haggerty
0 siblings, 1 reply; 2+ messages in thread
From: Michael Haggerty @ 2012-02-27 20:39 UTC (permalink / raw)
To: git discussion list; +Cc: Andy Parkins
In the following scenario, suppose that commit X is already in the
repository (referenced by master), and I push references A and B at the
same time:
-- master
/
o---X---*'--*'--* A
\
*---* B
The commits marked with "*" are new to the repository, and therefore the
emails generated by post-receive-email should summarize all five of
them. But in fact the commits marked with a prime (i.e., A^ and A^^)
are NOT included in any email.
The problem is that post-receive-email operates on one reference update
at a time, *after* the references have been updated. It generates the
"new" commits for A using the equivalent of
git rev-list ^master ^B A
and it generates the "new" commits for B using the equivalent of
git rev-list ^master ^B A
Neither of these ranges includes the commits common to branches A and B
and therefore those commits do not appear in any of the email notifications.
I first observed this problem in a slightly more complicated scenario
where a bugfix branch was merged to two release branches, then the two
release branches (but not the bugfix reference) were pushed:
o---o-------* release-A
/ /
o---o---o---*'--*'--*' bugfix
\ \
o---o-------* release-B
In this case only the merge commits were included in the commit emails;
the bugfixes commits themselves were never mentioned.
It seems like this problem can only be fixed by having
post-receive-email process all of the reference updates at once so that
the email generation for one reference update can take into account the
other references that were updated at the same time.
I don't plan to work on this problem; locally, we are using a Python
script that was derived from post-receive-email and enhanced in several
ways rather than using the Shell-script original. So when I have fixed
our Python script my own itch will have been scratched. If there is
interest in the Python email-notification script please let me know and
there is a chance I might clean it up enough to be released.
Michael
--
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Bug: post-receive-email sometimes misses commits
2012-02-27 20:39 Bug: post-receive-email sometimes misses commits Michael Haggerty
@ 2012-02-27 20:43 ` Michael Haggerty
0 siblings, 0 replies; 2+ messages in thread
From: Michael Haggerty @ 2012-02-27 20:43 UTC (permalink / raw)
To: git discussion list; +Cc: Andy Parkins
On 02/27/2012 09:39 PM, Michael Haggerty wrote:
> [...] It generates the
> "new" commits for A using the equivalent of
>
> git rev-list ^master ^B A
>
> and it generates the "new" commits for B using the equivalent of
>
> git rev-list ^master ^B A
Sorry, that last line should of course be
git rev-list ^master ^A B
Michael
--
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-27 20:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-27 20:39 Bug: post-receive-email sometimes misses commits Michael Haggerty
2012-02-27 20:43 ` Michael Haggerty
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).