Re: [PATCH v3 2/3] packed-backend: extract snapshot allocation in `load_contents`
- From
Patrick Steinhardt <ps@pks.im>
- Date
- May 12, 2025, 14:41 UTC
- Message-ID
- <aCIIiMGSF51-qUua@pks.im>
- In-Reply-To
- <aCHO2dqWM2m6xt9m@ArchLinux>
On Mon, May 12, 2025 at 06:35:05PM +0800, shejialuo wrote:
Show 19 quoted lines
> On Mon, May 12, 2025 at 10:37:03AM +0200, Patrick Steinhardt wrote: > > On Sun, May 11, 2025 at 10:01:50PM +0800, shejialuo wrote: > > > "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> > > > > Huh. Are you sure I suggested this? :) I cannot remember at least. > > > > Because you explain me a lot how Gitlab handles and Peff tells me how > Github handles, I add both of you.
I think that would've made sense for the last step where you introduce the adapted logic. But the intermediate steps have all been designed by yourself without my help :)
Anyway, I don't mind this, I just found it to be funny.
Patrick