Git development
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Karthik Nayak <karthik.188@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 00/18] setup: drop uses of `the_repository`
Date: Mon, 13 Apr 2026 07:48:08 +0200	[thread overview]
Message-ID: <adyDmC-y_P0gB_79@pks.im> (raw)
In-Reply-To: <CAOLa=ZRrK_5shCZwOar47kODe1kDKzcfXo764o9mE5ZA7xGePw@mail.gmail.com>

On Thu, Apr 09, 2026 at 09:05:21AM -0400, Karthik Nayak wrote:
> Patrick Steinhardt <ps@pks.im> writes:
> 
> > Hi,
> >
> > I've had enough of "setup.c" and its complexities, so I finally decided
> > to take the bullet and start refactoring this subsystem. This here is
> > the first out of the following three steps:
> >
> >   1. Drop all uses of `the_repository`. This doesn't yet allow us to get
> >      rid of `USE_THE_REPOSITORY_VARIABLE`.
> >
> >   2. Convert a couple of global variables and drop
> >      `is_bare_repository_cfg`, which then allows us to drop
> >      `USE_THE_REPOSITORY_VARIABLE`.
> >
> >   3. Refactor the subsystem a bit so that we stop intermixing repository
> >      discovery and repository initialization. This is my original
> >      motivation as I want to get rid of `odb_prepare_alternates()`, but
> >      due to the way we initialize the repository it has proven to be
> >      extremely tedious.
> >
> > Most of the patches in this series here are rather mechanical. There's
> > only a handful of patches that warrant more attention:
> >
> >   -  2/18: setup: stop using `the_repository` in `is_inside_worktree()`
> >   -  3/18: setup: stop using `the_repository` in `is_inside_git_dir()`
> >   -  9/18: setup: stop using `the_repository` in `setup_work_tree()`
> >   - 10/18: setup: stop using `the_repository` in `set_git_work_tree()`
> >
> > Those patches don't only mechanical move stuff around, but also change
> > some logic to make it work.
> >
> > The series is based on 5361983c07 (The 22nd batch, 2026-03-27). There is
> > a single merge commit with "seen", but it's trivial to resolve.
> >
> 
> The series looks good to me as is, like mentioned most of the patches
> were fairly straight forward where we simply inject the repo variable
> into the function. Thanks

Thanks!

Patrick

  reply	other threads:[~2026-04-13  5:48 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-30 13:17 [PATCH 00/18] setup: drop uses of `the_repository` Patrick Steinhardt
2026-03-30 13:17 ` [PATCH 01/18] setup: replace use of `the_repository` in static functions Patrick Steinhardt
2026-03-30 13:17 ` [PATCH 02/18] setup: stop using `the_repository` in `is_inside_worktree()` Patrick Steinhardt
2026-04-09 11:55   ` Karthik Nayak
2026-03-30 13:17 ` [PATCH 03/18] setup: stop using `the_repository` in `is_inside_git_dir()` Patrick Steinhardt
2026-04-09 12:58   ` Karthik Nayak
2026-04-13  5:47     ` Patrick Steinhardt
2026-04-13 15:36       ` Junio C Hamano
2026-03-30 13:17 ` [PATCH 04/18] setup: stop using `the_repository` in `prefix_path()` Patrick Steinhardt
2026-03-30 13:17 ` [PATCH 05/18] setup: stop using `the_repository` in `path_inside_repo()` Patrick Steinhardt
2026-03-30 13:17 ` [PATCH 06/18] setup: stop using `the_repository` in `verify_filename()` Patrick Steinhardt
2026-03-30 13:17 ` [PATCH 07/18] setup: stop using `the_repository` in `verify_non_filename()` Patrick Steinhardt
2026-03-30 13:17 ` [PATCH 08/18] setup: stop using `the_repository` in `enter_repo()` Patrick Steinhardt
2026-03-30 13:17 ` [PATCH 09/18] setup: stop using `the_repository` in `setup_work_tree()` Patrick Steinhardt
2026-04-18  1:11   ` Elijah Newren
2026-04-20  7:06     ` Patrick Steinhardt
2026-03-30 13:17 ` [PATCH 10/18] setup: stop using `the_repository` in `set_git_work_tree()` Patrick Steinhardt
2026-04-18  1:16   ` Elijah Newren
2026-04-20  7:06     ` Patrick Steinhardt
2026-03-30 13:17 ` [PATCH 11/18] setup: stop using `the_repository` in `setup_git_env()` Patrick Steinhardt
2026-03-30 13:17 ` [PATCH 12/18] setup: stop using `the_repository` in `setup_git_directory_gently()` Patrick Steinhardt
2026-03-30 13:17 ` [PATCH 13/18] setup: stop using `the_repository` in `setup_git_directory()` Patrick Steinhardt
2026-03-30 13:17 ` [PATCH 14/18] setup: stop using `the_repository` in `upgrade_repository_format()` Patrick Steinhardt
2026-03-30 13:17 ` [PATCH 15/18] setup: stop using `the_repository` in `check_repository_format()` Patrick Steinhardt
2026-04-18  1:23   ` Elijah Newren
2026-04-20  7:06     ` Patrick Steinhardt
2026-03-30 13:17 ` [PATCH 16/18] setup: stop using `the_repository` in `initialize_repository_version()` Patrick Steinhardt
2026-03-30 13:17 ` [PATCH 17/18] setup: stop using `the_repository` in `create_reference_database()` Patrick Steinhardt
2026-03-30 13:17 ` [PATCH 18/18] setup: stop using `the_repository` in `init_db()` Patrick Steinhardt
2026-04-09 13:05 ` [PATCH 00/18] setup: drop uses of `the_repository` Karthik Nayak
2026-04-13  5:48   ` Patrick Steinhardt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-04-20  8:22 Patrick Steinhardt
2026-04-20 15:50 ` Elijah Newren
2026-04-21  9:41   ` Patrick Steinhardt
2026-04-20 17:11 ` Junio C Hamano
2026-04-21  9:41   ` Patrick Steinhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=adyDmC-y_P0gB_79@pks.im \
    --to=ps@pks.im \
    --cc=git@vger.kernel.org \
    --cc=karthik.188@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox