Merge branch 'ps/refname-avail-check-optim'
Incorrect sorting of refs with bytes with high-bit set on platforms with signed char led to a BUG, which has been corrected. * ps/refname-avail-check-optim: refs/packed: fix BUG when seeking refs with UTF-8 characters
This commit is contained in:
@@ -980,9 +980,9 @@ static int packed_ref_iterator_advance(struct ref_iterator *ref_iterator)
|
||||
continue;
|
||||
|
||||
while (prefix && *prefix) {
|
||||
if (*refname < *prefix)
|
||||
if ((unsigned char)*refname < (unsigned char)*prefix)
|
||||
BUG("packed-refs backend yielded reference preceding its prefix");
|
||||
else if (*refname > *prefix)
|
||||
else if ((unsigned char)*refname > (unsigned char)*prefix)
|
||||
return ITER_DONE;
|
||||
prefix++;
|
||||
refname++;
|
||||
|
||||
Reference in New Issue
Block a user