git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 17 in “Add refs optimize subcommand”
  1. Meet SoniAug 26, 2025
  2. [GSoC][PATCH 1/5] builtin/pack-refs: factor out core logic into a helperMeet Soni, Aug 26, 2025
  3. Patrick SteinhardtSep 2, 2025
  4. Meet SoniSep 3, 2025
  5. Patrick SteinhardtSep 3, 2025
  6. Junio C HamanoSep 3, 2025
  7. Patrick SteinhardtSep 3, 2025
  8. Junio C HamanoSep 3, 2025
  9. [GSoC][PATCH 2/5] doc: factor out common optionMeet Soni, Aug 26, 2025
  10. [GSoC][PATCH 3/5] builtin/refs: add optimize subcommandMeet Soni, Aug 26, 2025
  11. Patrick SteinhardtSep 2, 2025
  12. [GSoC][PATCH 4/5] t0601: refactor tests to be shareableMeet Soni, Aug 26, 2025
  13. [GSoC][PATCH 5/5] t: add test for git refs optimize subcommandMeet Soni, Aug 26, 2025
  14. shejialuoAug 26, 2025
  15. Meet SoniAug 31, 2025
  16. Patrick SteinhardtSep 2, 2025
  17. Meet SoniSep 3, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.