Re: [PATCH] prune: recursively prune objects directory

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

 



Eric Wong <e@xxxxxxxxx> writes:

> Junio C Hamano <gitster@xxxxxxxxx> wrote:
>> Eric Wong <e@xxxxxxxxx> writes:
>> 
>> > I am unsure about duplicating ishex() from name-rev.c, however...
>> 
>> Yeah, I wonder why name-rev.c does not use isxdigit() in the first
>> place.
>
> isxdigit includes uppercase [A-F].  I think being strict is
> better, here.  I don't want to open up a can of worms if we
> become tolerant of 3rd-party git implementations developed on
> case-insensitive FSes.

OK, we do not recurse into .git/objects/AA/ for the same reason why
we do not recurse into .git/objects/info/.  We do expect [0-9a-f]{2}
and pack to be directories, so we go silent if they are missing, but
we do complain if somebody creates a regular file .git/objects/aa
for fun.

I agree that isxdigit() is not a good match.  I also agree with what
you said about it belong to git-compat-util.h but let's leave it for
a future clean-up patch to remove both copies of ishex(), introduce
islxdigit() in git-compat-util.h and use it as its replacement.




[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