diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-05-16 21:05:23 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-05-16 21:05:23 +0900 |
commit | a737e1f1d25747481bd4925555006f569e461117 (patch) | |
tree | f7f7cb6a78b9e67f9eb6e9c35cdc85758c0ebd25 /cache.h | |
parent | Merge branch 'jt/push-negotiation' (diff) | |
parent | ci: run test round with parallel-checkout enabled (diff) | |
download | tgif-a737e1f1d25747481bd4925555006f569e461117.tar.xz |
Merge branch 'mt/parallel-checkout-part-3'
The final part of "parallel checkout".
* mt/parallel-checkout-part-3:
ci: run test round with parallel-checkout enabled
parallel-checkout: add tests related to .gitattributes
t0028: extract encoding helpers to lib-encoding.sh
parallel-checkout: add tests related to path collisions
parallel-checkout: add tests for basic operations
checkout-index: add parallel checkout support
builtin/checkout.c: complete parallel checkout support
make_transient_cache_entry(): optionally alloc from mem_pool
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -370,16 +370,20 @@ struct cache_entry *make_empty_cache_entry(struct index_state *istate, size_t name_len); /* - * Create a cache_entry that is not intended to be added to an index. - * Caller is responsible for discarding the cache_entry - * with `discard_cache_entry`. + * Create a cache_entry that is not intended to be added to an index. If + * `ce_mem_pool` is not NULL, the entry is allocated within the given memory + * pool. Caller is responsible for discarding "loose" entries with + * `discard_cache_entry()` and the memory pool with + * `mem_pool_discard(ce_mem_pool, should_validate_cache_entries())`. */ struct cache_entry *make_transient_cache_entry(unsigned int mode, const struct object_id *oid, const char *path, - int stage); + int stage, + struct mem_pool *ce_mem_pool); -struct cache_entry *make_empty_transient_cache_entry(size_t name_len); +struct cache_entry *make_empty_transient_cache_entry(size_t len, + struct mem_pool *ce_mem_pool); /* * Discard cache entry. |