mirror of
https://github.com/git/git.git
synced 2026-01-09 17:46:37 +00:00
reftable: rename scratch buffer
Both `struct block_writer` and `struct reftable_writer` have a `buf` member that is being reused to optimize the number of allocations. Rename the variable to `scratch` to clarify its intend and provide a comment explaining why it exists. Suggested-by: Christian Couder <christian.couder@gmail.com> Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
0f5762b043
commit
ef46ad0815
@@ -39,7 +39,8 @@ struct block_writer {
|
||||
uint32_t restart_cap;
|
||||
|
||||
struct reftable_buf last_key;
|
||||
struct reftable_buf buf;
|
||||
/* Scratch buffer used to avoid allocations. */
|
||||
struct reftable_buf scratch;
|
||||
int entries;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user