You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 <[email protected]>
Suggested-by: Patrick Steinhardt <[email protected]>
Signed-off-by: shejialuo <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
0 commit comments