mirror of
https://github.com/git/git.git
synced 2026-01-09 17:46:37 +00:00
make_transient_cache_entry(): optionally alloc from mem_pool
Allow make_transient_cache_entry() to optionally receive a mem_pool struct in which it should allocate the entry. This will be used in the following patch, to store some transient entries which should persist until parallel checkout finishes. Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
68e66f2987
commit
9616882780
@@ -39,7 +39,7 @@ static void packet_to_pc_item(const char *buffer, int len,
|
||||
}
|
||||
|
||||
memset(pc_item, 0, sizeof(*pc_item));
|
||||
pc_item->ce = make_empty_transient_cache_entry(fixed_portion->name_len);
|
||||
pc_item->ce = make_empty_transient_cache_entry(fixed_portion->name_len, NULL);
|
||||
pc_item->ce->ce_namelen = fixed_portion->name_len;
|
||||
pc_item->ce->ce_mode = fixed_portion->ce_mode;
|
||||
memcpy(pc_item->ce->name, variant, pc_item->ce->ce_namelen);
|
||||
|
||||
Reference in New Issue
Block a user