public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: "brian m. carlson" <sandals@crustytoothpaste•net>
Cc: git@vger•kernel.org, Stefan Beller <stefanbeller@gmail•com>,
	Jeff King <peff@peff•net>
Subject: Re: [PATCH 2/2] format-patch: add an option to suppress commit hash
Date: Tue, 08 Dec 2015 10:18:28 -0800	[thread overview]
Message-ID: <xmqqa8pkls7f.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20151208010227.GC990758@vauxhall.crustytoothpaste.net> (brian m. carlson's message of "Tue, 8 Dec 2015 01:02:27 +0000")

"brian m. carlson" <sandals@crustytoothpaste•net> writes:

>> Don't test "any number of '0'"; test 40 '0's.  This is because the
>> line format was designed to be usable by things like /etc/magic to
>> detect format-patch output, and we want to notice if/when we break
>> that aspect of our output format.
>
> My idea was to future-proof it against changes in the hash function,
> although that's in the distant future.

Making sure that the test fails when somebody accidentally lengthens
(or fails to truncate to 40-hex, when you start using a longer hash)
the displayed name there is a good future-proofing.

Thanks.

  reply	other threads:[~2015-12-08 18:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-06 22:16 [PATCH 0/2] format-patch: introduce option to suppress commit hashes brian m. carlson
2015-12-06 22:16 ` [PATCH 1/2] Introduce a null_oid constant brian m. carlson
2015-12-06 22:16 ` [PATCH 2/2] format-patch: add an option to suppress commit hash brian m. carlson
2015-12-07 19:34   ` Junio C Hamano
2015-12-07 19:47     ` Junio C Hamano
2015-12-08  1:02     ` brian m. carlson
2015-12-08 18:18       ` Junio C Hamano [this message]
2015-12-07  2:49 ` [PATCH 0/2] format-patch: introduce option to suppress commit hashes Junio C Hamano
2015-12-07  3:30   ` brian m. carlson
2015-12-07  8:22     ` Junio C Hamano

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=xmqqa8pkls7f.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=peff@peff$(echo .)net \
    --cc=sandals@crustytoothpaste$(echo .)net \
    --cc=stefanbeller@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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