From: Junio C Hamano Date: Tue, 18 Sep 2007 04:18:20 +0000 (-0700) Subject: send-email: make message-id generation a bit more robust X-Git-Tag: v1.5.3.2~12 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/be510cfef3d8344007bd34128ca6eb799b714c8c?hp=be510cfef3d8344007bd34128ca6eb799b714c8c send-email: make message-id generation a bit more robust Earlier code took Unix time and appended a few random digits. If you are firing off many messages within a second, you could issue the same id to different messages, which is a no-no. If you send out 31 messages within a single second, with random integer taken out of rand(4200), you have about 10% chance of producing the same message ID. This fixes the problem by uses a prefix string which is constant-per-invocation (time and pid), with a serial number for each message generated by the process appended at the end. Signed-off-by: Junio C Hamano ---