Subject: Re: [PATCH v2 1/3] builtin: add a repository parameter for builtin functions

From: Patrick Steinhardt <[email-masked]>
Date: Thu, 12 Sep 2024 11:45:47 +0200

On Wed, Sep 11, 2024 at 02:08:17PM -0700, Junio C Hamano wrote:
> Junio C Hamano <[email-masked]> writes:
> 
> > "John Cai via GitGitGadget" <[email-masked]> writes:
> >
> >>  git.c                              |  12 +-
> >>  help.c                             |   3 +-
> >>  stkOs5Qh                           | Bin 0 -> 10485768 bytes
> >
> > WTH is this file?
> 
> It turns out to be an "ar" archive full of *.o files.  Perhaps
> creation of libgit.a was interrupted, then later somebody said
> "git add .", and the file somehow ended up as a part of Git.
> 
> I've applied the series after removing the cruft.

I've noticed that something leaves behind this garbage from time to
time. It's a shame that its name is just random gibberish, because that
makes it impossible to set up a gitignore rule for it.

> The overall thrust to pass the repository found by the setup step to
> builtins as a parameter is a very good one, as most of the Git
> commands are designed to work in a repository.

Yup, that's the direction we want to move into. We're basically trying
to approach getting rid of `the_repository` both bottom-up and top-down
now. My changes are bottom up, libifying the low-level subsystems as we
go. And this here is the first change going top-down, getting rid of the
global dependency in our builtins. Eventually the plan is to meet in the
middle.

Patrick