summaryrefslogtreecommitdiff
path: root/commit-graph.c
diff options
context:
space:
mode:
authorshejialuo <shejialuo@gmail.com>2025-05-14 23:50:35 +0800
committerJunio C Hamano <gitster@pobox.com>2025-05-14 12:32:58 -0700
commita0dee3f74b4f42076b7c23ca6d9aca61ed064e82 (patch)
tree90813e4d8cd58fb0c44f3163bb1bc5cfe0ed5cdc /commit-graph.c
parent784ceccb91b82dc8a2c69ddd6f1f5ccc2e2f96f2 (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