From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Cc: Bill Lear <rael@zopyra.com>, "Eric Mertens" <emertens@gmail.com>
Subject: Re: Correction for post-receive-email
Date: Fri, 5 Oct 2007 15:29:43 +0100 [thread overview]
Message-ID: <200710051529.45440.andyparkins@gmail.com> (raw)
In-Reply-To: <18182.12163.311826.242309@lisa.zopyra.com>
On Friday 2007 October 05, Bill Lear wrote:
> I have a few changes I would like to see in this script, ones that I think
> would make it generally more useful. I don't have a clean patch, though,
> so should I just submit suggestions to you directly, Andy?
Me; or the list. Or both.
I'm happy to try to accommodate any suggestions. I'm happy if it is useful to
anyone other than just me :-)
--- SNIP THIS BIT IF YOU'RE NOT INTERESTED IN ITS BUGS ---
The big fault in it as it stands is that it doesn't try to reorder the refs
being updated to the most logical form. For example:
O --- * --- A (ref2)
\
B (ref1)
Let's say that both ref1 and ref2 were originally at O and this push has moved
them to these new locations. The email hook gets sent this information like
this:
refs/heads/ref1 O B
refs/heads/ref2 O A
The hook iterates through this list, for each ref update it shows only the
commits introduced by the change that aren't already included in an existing
ref. This is the problem, ref2 introduced "*" and "A" and ref1
introduced "B", ideally then the two emails would show
ref2 updated from O to A
new revs: *, A
ref1 updated from O to B
new revs: B
But because ref1 is alphabetically before ref1, what you get is:
ref1 updated from O to B
new revs: *, A, B
ref2 updated from O to A
new revs: <none>
I can't say I know what the answer is; nor even what the correct output should
be. If anyone has opinions on this, I'll be glad to hear them.
Andy
--
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com
prev parent reply other threads:[~2007-10-05 14:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-05 7:14 Correction for post-receive-email Eric Mertens
2007-10-05 8:13 ` Andy Parkins
2007-10-05 8:54 ` Andreas Ericsson
2007-10-05 12:35 ` Bill Lear
2007-10-05 14:29 ` Andy Parkins [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200710051529.45440.andyparkins@gmail.com \
--to=andyparkins@gmail.com \
--cc=emertens@gmail.com \
--cc=git@vger.kernel.org \
--cc=rael@zopyra.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).