diff options
author | shejialuo <shejialuo@gmail.com> | 2025-05-14 23:50:35 +0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2025-05-14 12:32:58 -0700 |
commit | a0dee3f74b4f42076b7c23ca6d9aca61ed064e82 (patch) | |
tree | 90813e4d8cd58fb0c44f3163bb1bc5cfe0ed5cdc /commit-graph.c | |
parent | 784ceccb91b82dc8a2c69ddd6f1f5ccc2e2f96f2 (diff) |
packed-backend: extract snapshot allocation in `load_contents`
"load_contents" would choose which way to load the content of the
"packed-refs". However, we cannot directly use this function when
checking the consistency due to we don't want to open the file. And we
also need to reuse the logic to avoid causing repetition.
Let's create a new helper function "allocate_snapshot_buffer" to extract
the snapshot allocation logic in "load_contents" and update the
"load_contents" to align with the behavior.
Suggested-by: Jeff King <peff@peff.net>
Suggested-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: shejialuo <shejialuo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
0 files changed, 0 insertions, 0 deletions