From: Matti Aarnio <matti.aarnio@zmailer.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Adrian Bunk <bunk@kernel.org>, Avi Kivity <avi@qumranet.com>,
linux-kernel@vger.kernel.org, git@vger.kernel.org
Subject: Re: git-send-email creates duplicate Message-Id's
Date: Mon, 17 Sep 2007 23:47:01 +0300 [thread overview]
Message-ID: <20070917204701.GU6372@mea-ext.zmailer.org> (raw)
In-Reply-To: <7vejgxyrde.fsf@gitster.siamese.dyndns.org>
On Mon, Sep 17, 2007 at 01:22:05PM -0700, Junio C Hamano wrote:
> Adrian Bunk <bunk@kernel.org> writes:
>
> > The following might be a bug in git-send-email (git maintainers Cc'ed
> > and KVM list removed from Cc):
> >
> > Patch 54 got the same Message-Id as patch 61 and patch 89 got the same
> > Message-Id as patch 104.
> > ...
> > The emails are:
> > http://marc.info/?l=linux-kernel&m=119002061330270&w=2
> > http://marc.info/?l=linux-kernel&m=119002059626434&w=2
> > http://marc.info/?l=linux-kernel&m=119002060011801&w=2
> > http://marc.info/?l=linux-kernel&m=119002060318915&w=2
>
> The old code generated rand(4200) for each message and appended
> it to the timestamp. I do not know where the original author
> got 4200 from, but I think if you send many messages within a
> single second it is possible to get collisions.
>
> I guess something like this patch is an improvement? It
> generates a single prefix from timestamp and random, and appends
> a number that is incremented for each message.
Much better. You may also consider a possibility of
letting your local MTA do the Message-ID generation, unless
you are tracking something with it and thus need to know the
generated values. .. but apparently git much prefers sending
email by SMTP, where the message-id must be present, or one
really should block any such emails.. (except that systems
like qmail send error messages without message-id ...)
My own recipe is:
sprintf("%d-%d-%d", time , getpid, ++localsequence)
catenate on that your favourite domain name where that recipe
is likely to be valid, and you are all set.
/Matti Aarnio -- one of <postmaster@vger.kernel.org>
prev parent reply other threads:[~2007-09-17 20:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <11900179463203-git-send-email-avi@qumranet.com>
2007-09-17 15:59 ` git-send-email creates duplicate Message-Id's Adrian Bunk
2007-09-17 20:22 ` Junio C Hamano
2007-09-17 20:47 ` Matti Aarnio [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=20070917204701.GU6372@mea-ext.zmailer.org \
--to=matti.aarnio@zmailer.org \
--cc=avi@qumranet.com \
--cc=bunk@kernel.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=linux-kernel@vger.kernel.org \
/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).