Re: [PATCH v6 14/16] refs/iterator: implement seeking for packed-ref iterators

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

 



On 2025-04-03 at 19:56:39, Elijah Newren wrote:
> In this case, the utf-8 characters will have individual bytes whose
> values are greater than 127, which for a signed character will be
> represented by a negative number.  I tried tweaking the loop to:
> 
>         while (prefix && *prefix) {
>             if ((unsigned char)*refname < (unsigned char)*prefix) {
>                 printf("Comparing %d to %d\n",
>                        *refname, *prefix);
>                 printf("Comparing %s to %s\n",
>                        refname, prefix);
>                 BUG("packed-refs backend yielded reference preceding
> its prefix");

I was mentioning this to Elijah earlier, but I think we might want to
use more emojis in testing things like refs and other text patterns in
our testsuite.  Because most of them are in astral planes, that will
help us exercise our UTF-8 and UTF-16 surrogate handling, which is also
relevant to a variety of languages, like Chinese, which we obviously
want to support but which contributors may be less familiar with.  Since
emoji are more universal, it's easier for anyone to add a test for these
kinds of cases and we might be able to catch some of these kinds of
things earlier.

That's in addition to the fact that many people use emojis in things
like commit messages because they're fun and we want to make those work.

Next time I'm sending patches, I'll endeavour to cover a wider variety
of codepoints in my testing.
-- 
brian m. carlson (they/them)
Toronto, Ontario, CA

Attachment: signature.asc
Description: PGP signature


[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