diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-10-08 12:17:55 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-10-08 12:17:55 -0700 |
| commit | 75f8dfabaa2f071ac2b527d225b0312d70f94e64 (patch) | |
| tree | 0df6ed8cb28ecc9bf34c423f0d3aa87b791db8fb /read-cache.c | |
| parent | Merge branch 'mh/doc-credential-url-prefix' (diff) | |
| parent | ci: enable Rust for breaking-changes jobs (diff) | |
| download | git-75f8dfabaa2f071ac2b527d225b0312d70f94e64.tar.gz git-75f8dfabaa2f071ac2b527d225b0312d70f94e64.zip | |
Merge branch 'ps/rust-balloon'
Dip our toes a bit to (optionally) use Rust implemented helper
called from our C code.
* ps/rust-balloon:
ci: enable Rust for breaking-changes jobs
ci: convert "pedantic" job into full build with breaking changes
BreakingChanges: announce Rust becoming mandatory
varint: reimplement as test balloon for Rust
varint: use explicit width for integers
help: report on whether or not Rust is enabled
Makefile: introduce infrastructure to build internal Rust library
Makefile: reorder sources after includes
meson: add infrastructure to build internal Rust library
Diffstat (limited to 'read-cache.c')
| -rw-r--r-- | read-cache.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/read-cache.c b/read-cache.c index 94098a3861..032480d0c7 100644 --- a/read-cache.c +++ b/read-cache.c @@ -1806,7 +1806,7 @@ static struct cache_entry *create_from_disk(struct mem_pool *ce_mem_pool, if (expand_name_field) { const unsigned char *cp = (const unsigned char *)name; - size_t strip_len, previous_len; + uint64_t strip_len, previous_len; /* If we're at the beginning of a block, ignore the previous name */ strip_len = decode_varint(&cp); @@ -2654,8 +2654,10 @@ static int ce_write_entry(struct hashfile *f, struct cache_entry *ce, hashwrite(f, ce->name, len); hashwrite(f, padding, align_padding_size(size, len)); } else { - int common, to_remove, prefix_size; + int common, to_remove; + uint8_t prefix_size; unsigned char to_remove_vi[16]; + for (common = 0; (common < previous_name->len && ce->name[common] && |
