Re: [PATCHv2] gitweb: Better regexp for SHA-1 committag match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano wrote:
> Jakub Narebski <jnareb@xxxxxxxxx> writes:
> 
> > Make SHA-1 regexp to be turned into hyperlink (SHA-1 committag)
> > to match word boundary at beginning and end.  This way we limit
> > false matches, for example 0x74a5cd01 which is hex decimal (for
> > example memory address) but not SHA-1.
> >
> > Also make sure that it is not Message-ID, which fragment just
> > looks like SHA-1 (e.g. "Message-ID: <46A0F335@xxxxxxxxxxx>"),
> > by using zero-width negative look-ahead assertion to _not_
> > match '@' after.
> 
> Your message I am responding to is:
> 
>     Message-ID: <200902061149.16210.jnareb@xxxxxxxxx>
> 
> Does your description mean that "200902061149" would match, because the
> LAA will say "Ah, dot is not an at-sign"?

It would unfortunately falsely match... but we cannot eliminate this
case (well, at least not checking if hexnumber is followed by dot),
because of totally legitimate

   ... at commit 8457bb9e.

So even with that we would have still false matches...
-- 
Jakub Narebski
Poland
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux