Re: [PATCH v7 04/28] hash.h: provide constants for the hash IDs
- From
Han-Wen Nienhuys <hanwen@google.com>
- Date
- Apr 21, 2021, 09:43 UTC
- Message-ID
- <CAFQ2z_NAQ02y1gaTymzi21aHxh+bswvr6ko_Eg=1uuHds4mGyg@mail.gmail.com>
- In-Reply-To
- <YH96CcJhZt4CTPWD@camp.crustytoothpaste.net>
On Wed, Apr 21, 2021 at 3:04 AM brian m. carlson <sandals@crustytoothpaste.net> wrote:
Show 14 quoted lines
> > I agree that it makes sense to have symbolic constants defined in
> > this file. These are values that fit in the ".format_id" member of
> > "struct git_hash_algo", and it is preferrable to make sure that the
> > names align (if I were designing in void, I would have called the
> > member "algo_id" and made the constants GIT_(SHA1|SHA256)_ALGO_ID).
> >
> > Brian? What's your preference ("I am fine to store HASH_ID in the
> > '.format_id' member" is perfectly an acceptable answer).
>
> I slightly prefer FORMAT_ID because it's consistent (and for that reason
> only), but if HASH_ID is more convenient, that's fine; I don't have a
> strong opinion at all. Definitely don't reroll the series because of my
> slight preference. Either way, I think these are fine things to have as
> constants, and I appreciate you hoisting the comments here.Either way is fine for me. I can paint the bikeshed in your favorite color :)
-- Han-Wen Nienhuys - Google Munich I work 80%. Don't expect answers from me on Fridays. -- Google Germany GmbH, Erika-Mann-Strasse 33, 80636 Munich Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Paul Manicle, Halimah DeLaine Prado