Re: [PATCH v2] git-gui: Add support of SHA256 repo

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

 



On Tue, 15 Jul 2025 21:19:38 +0200,
Johannes Sixt wrote:
> 
> Am 15.07.25 um 16:18 schrieb Takashi Iwai:
> > On Mon, 14 Jul 2025 18:28:13 +0200,
> >> BTW, there is a case
> >>
> >>       if {[regexp {^[0-9a-f]{1,39}$} $head]}
> >>
> >> around line 3217 in git-gui.sh.
> > 
> > Obviously I didn't look for numbers less than 40 :)
> > I'll replace it, too.
> > 
> > But I don't understand why it matches up to only 39, not 40 in the
> > code above.
> > It seems trying to get the proper hash id if it's no full length id?
> > If so, the check should be rather like
> > 	if {![regexp {^[0-9a-f]{40}$} $head]}
> > ??  It makes the conversion a bit simpler.
> 
> Obviously, the code wants to turn abbreviated hashes to full hashes.
> That can be skipped if it is already the full length. I haven't analyzed
> why this is needed or desirable.

Maybe it wants only the abbreviated hashes and no other refs?
I'll keep the logic in v3 patch.  If any, we can clean up later.


thanks,

Takashi




[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