Details
- Reviewers
Alphare martinvonz - Group Reviewers
hg-reviewers - Commits
- rHG41733a1c3532: cext: isolate hash size in the revlog handling in a single place
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
Event Timeline
mercurial/cext/revlog.c | ||
---|---|---|
1500 | Is this extra node[1] == '\0' check intentional? It seems unrelated to me. Can you move it to a separate patch? |
mercurial/cext/revlog.c | ||
---|---|---|
1500 | Yes, it is intentional. I've added it because unlike before, the memcmp will not be inlined automatically and therefore the original check does come with a much higher false positive rate. The explicit check is for free on all architectures with unaligned memory access. |
mercurial/cext/revlog.c | ||
---|---|---|
1500 | Okay, makes sense. That was far from obvious (to me anyway) and could probably have been mentioned in the commit message. |
Can you send a followup for this warning?
mercurial/cext/revlog.c: In function 'index_init': mercurial/cext/revlog.c:2615:42: warning: comparison of integer expressions of different signedness: 'Py_ssize_t' {aka 'long int'} and 'long unsigned int' [-Wsign-compare] 2615 | if (self->nodelen < 20 || self->nodelen > sizeof(nullid)) { | ^
Is this extra node[1] == '\0' check intentional? It seems unrelated to me. Can you move it to a separate patch?