Re: [PATCH 01/10] get_sha1: detect buggy calls with multiple disambiguators
- From
Jeff King <peff@peff.net>
- Date
- Sep 26, 2016, 17:21 UTC
- Message-ID
- <20160926172111.sve6tsse2figcved@sigill.intra.peff.net>
- In-Reply-To
- <xmqqbmzavcqx.fsf@gitster.mtv.corp.google.com>
On Mon, Sep 26, 2016 at 09:37:10AM -0700, Junio C Hamano wrote:
Show 10 quoted lines
> > We can do the check easily with some bit-twiddling, and as a
> > bonus, the bit-mask of disambiguators will come in handy in
> > a future patch.
> >
> > Signed-off-by: Jeff King <peff@peff.net>
> > ---
>
> Other than your reinvention of HAS_MULTI_BITS(), which has been with
> us since db7244bd ("parse-options new features.", 2007-11-07), this
> looks like a reasonable thing to do.Heh, I _thought_ we had something like that but couldn't find it. I grepped for "[^&]& .*-", which does match it, but stupidly did it only in '*.c'. Definitely it should use the existing macro instead.
-Peff