git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Karthik Nayak <karthik.188@gmail.com>,
	Phillip Wood <phillip.wood123@gmail.com>
Subject: Re: [PATCH v2 0/6] global: drop `the_index` variable
Date: Fri, 19 Apr 2024 06:25:50 +0200	[thread overview]
Message-ID: <ZiHyTgb9QrfptexL@tanuki> (raw)
In-Reply-To: <xmqq34ritqdb.fsf@gitster.g>

[-- Attachment #1: Type: text/plain, Size: 2093 bytes --]

On Thu, Apr 18, 2024 at 12:36:32PM -0700, Junio C Hamano wrote:
> Patrick Steinhardt <ps@pks.im> writes:
> 
> > this is the second version of my patch series that aims to drop
> > `the_index`.
> >
> > Changes compared to v1:
> >
> >   - This version goes a bit further now and completely drops the
> >     static `the_index` variable, as well. The repository's index gets
> >     allocated dynamically now, like all the other sub-structures like
> >     the ODB.
> >
> >   - This also allows this series to remove `initialize_the_repository()`
> >     now. Instead, callers call `initialize_repository()` now.
> >
> > There is still quite an ugly hack in `initialize_repository()` which
> > requires us to treat `the_repository` specially. This is because
> > `the_hash_algo` maps to `the_repository->hash_algo`, and we rely on it
> > being initialized to SHA1. So we need call `repo_set_hash_algo()` on
> > `the_repository`. On the other hand, we cannot set the hash algo on
> > repos which are not `the_repository`, because that breaks stuff, as
> > well.
> >
> > I'm currently prepping another patch series that builds on top of this
> > series and cleans up this mess. It surfaces several bugs that got masked
> > by our setup, like for example `git rev-parse --short=` not working
> > correctly with SHA256 because we always truncate to the maximum length
> > of SHA1.
> 
> I'll take a look, and may even comment on them later, but let me
> otherwise place this series on the back burner, not because I am in
> love with the_index (I am not) and not because I think the "index"
> member in the repository struct is a mistake (I suspect it is, but I
> am not convinced either way), but because I'd prefer to see our tree
> to be quiescent when we apply a tree-wide patch like [2/6], but
> we'll be in -rc period soonish, during which time we'd want to be
> able to concentrate on fixing regressions without having to worry
> about being able to reapply such tree-wide changes to keep 'next'
> and 'seen' building.

Makes sense, thanks!

Patrick

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2024-04-19  4:26 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-15 11:42 [PATCH 0/5] global: drop external `the_index` variable Patrick Steinhardt
2024-04-15 11:42 ` [PATCH 1/5] t/helper: stop using `the_index` Patrick Steinhardt
2024-04-17 17:23   ` Karthik Nayak
2024-04-15 11:42 ` [PATCH 2/5] builtin: " Patrick Steinhardt
2024-04-17 17:32   ` Karthik Nayak
2024-04-18 12:16     ` Patrick Steinhardt
2024-04-15 11:42 ` [PATCH 3/5] repository: initialize index in `repo_init()` Patrick Steinhardt
2024-04-17 17:38   ` Karthik Nayak
2024-04-18 12:16     ` Patrick Steinhardt
2024-04-15 11:43 ` [PATCH 4/5] builtin/clone: stop using `the_index` Patrick Steinhardt
2024-04-15 11:43 ` [PATCH 5/5] repository: drop global `the_index` variable Patrick Steinhardt
2024-04-15 13:55 ` [PATCH 0/5] global: drop external " Phillip Wood
2024-04-15 14:15   ` Patrick Steinhardt
2024-04-15 17:50   ` Junio C Hamano
2024-04-16  5:27     ` Patrick Steinhardt
2024-04-17 17:40 ` Karthik Nayak
2024-04-18 12:16   ` Patrick Steinhardt
2024-04-18 12:14 ` [PATCH v2 0/6] global: drop " Patrick Steinhardt
2024-04-18 12:14   ` [PATCH v2 1/6] t/helper: stop using `the_index` Patrick Steinhardt
2024-04-18 12:14   ` [PATCH v2 2/6] builtin: " Patrick Steinhardt
2024-04-18 12:14   ` [PATCH v2 3/6] repository: initialize index in `repo_init()` Patrick Steinhardt
2024-04-18 12:14   ` [PATCH v2 4/6] builtin/clone: stop using `the_index` Patrick Steinhardt
2024-04-18 12:14   ` [PATCH v2 5/6] repository: drop `the_index` variable Patrick Steinhardt
2024-04-18 12:14   ` [PATCH v2 6/6] repository: drop `initialize_the_repository()` Patrick Steinhardt
2024-04-18 19:36   ` [PATCH v2 0/6] global: drop `the_index` variable Junio C Hamano
2024-04-19  4:25     ` Patrick Steinhardt [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=ZiHyTgb9QrfptexL@tanuki \
    --to=ps@pks.im \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=karthik.188@gmail.com \
    --cc=phillip.wood123@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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).