Re: [GSoC][PATCH 1/5] builtin/pack-refs: factor out core logic into a helper
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Sep 3, 2025, 06:00 UTC
- Message-ID
- <aLfZflWT4618ptCA@pks.im>
- In-Reply-To
- <xmqq8qiwgl9j.fsf@gitster.g>
On Tue, Sep 02, 2025 at 10:25:44PM -0700, Junio C Hamano wrote:
Show 14 quoted lines
> Patrick Steinhardt <ps@pks.im> writes: > > >> builtin/pack-refs.c | 31 ++++++++++++++++++++----------- > >> pack-refs.h | 22 ++++++++++++++++++++++ > >> 2 files changed, 42 insertions(+), 11 deletions(-) > >> create mode 100644 pack-refs.h > > > > Shouldn't that header live in "builtin/pack-refs.h"? Makes it way more > > obvious that it exposes functions from "builtin/pack-refs.c". > > There shouldn't be any *.h files in builtin/. since the top-level > is where the library-ish reusable things live, so that they can > eventually be used by more than one *.c files in builtin/ and also > by other *.c files outside builtin.
Hm, okay. I still find it puzzling if the header file for "builtin/pack-refs.c" sits in "pack-refs.h" as it makes it very hard to connect these two. How would you reconcile that? By moving the shared logic into (non-"builtin/) "pack-refs.c"?
Patrick