From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: Usman Akinyemi <usmanakinyemi202@gmail.com>,
git@vger.kernel.org, Karthik Nayak <karthik.188@gmail.com>,
Justin Tobler <jltobler@gmail.com>
Subject: Re: [PATCH v2 12/12] hash: stop depending on `the_repository` in `null_oid()`
Date: Fri, 07 Mar 2025 08:53:33 -0800 [thread overview]
Message-ID: <xmqqbjucg4tu.fsf@gitster.g> (raw)
In-Reply-To: <Z8q3nzhl3DHETZgf@pks.im> (Patrick Steinhardt's message of "Fri, 7 Mar 2025 10:08:47 +0100")
Patrick Steinhardt <ps@pks.im> writes:
> So in theory, I don't really think there is anything that keeps us from
> mixing object formats, and I even think that this is a necessary feature
> to have once people start to migrate their repositories to SHA256. There
> are people out there who use submodules, and it may not be feasible for
> them to wait until all of their submodules have been converted to SHA256
> to migrate their own repositories.
> ...
> Anyway, that was a bit of a tangent to your initial question: which hash
> should we be passing in the first place? As it turns out, we should be
> passing the superproject's null OID indeed. The object ID we pass to
> `repo_submodule_init()` does not describe any object in the submodule
> itself, but rather indicates which tree-ish the submodule information
> should be parsed from in the superproject. As such, it refers to an
> object in the superproject itself and should thus use its object hash.
Good reasoning.
So the null-object suitable for the superproject is what we want
there after all. We've been using the_hash_algo, which is the
algorithm used in the_repository, which in turn *IS* the
superproject in this code path, so we have been correct all the time
;-)
next prev parent reply other threads:[~2025-03-07 16:53 UTC|newest]
Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-03 8:47 [PATCH 00/12] Stop depending on `the_repository` in object-related subsystems Patrick Steinhardt
2025-03-03 8:47 ` [PATCH 01/12] csum-file: stop depending on `the_repository` Patrick Steinhardt
2025-03-06 10:37 ` Karthik Nayak
2025-03-03 8:47 ` [PATCH 02/12] object: " Patrick Steinhardt
2025-03-06 11:07 ` Karthik Nayak
2025-03-06 14:55 ` Patrick Steinhardt
2025-03-03 8:47 ` [PATCH 03/12] pack-write: stop depending on `the_repository` and `the_hash_algo` Patrick Steinhardt
2025-03-04 18:46 ` Justin Tobler
2025-03-03 8:47 ` [PATCH 04/12] environment: move access to "core.bigFileThreshold" into repo settings Patrick Steinhardt
2025-03-04 19:32 ` Justin Tobler
2025-03-06 14:54 ` Patrick Steinhardt
2025-03-03 8:47 ` [PATCH 05/12] pack-check: stop depending on `the_repository` Patrick Steinhardt
2025-03-06 11:14 ` Karthik Nayak
2025-03-03 8:47 ` [PATCH 06/12] pack-revindex: " Patrick Steinhardt
2025-03-03 8:47 ` [PATCH 07/12] pack-bitmap-write: " Patrick Steinhardt
2025-03-03 8:47 ` [PATCH 08/12] object-file-convert: " Patrick Steinhardt
2025-03-04 19:45 ` Justin Tobler
2025-03-03 8:47 ` [PATCH 09/12] delta-islands: " Patrick Steinhardt
2025-03-04 19:48 ` Justin Tobler
2025-03-03 8:47 ` [PATCH 10/12] object-file: split out logic regarding hash algorithms Patrick Steinhardt
2025-03-03 8:47 ` [PATCH 11/12] hash: fix "-Wsign-compare" warnings Patrick Steinhardt
2025-03-03 8:47 ` [PATCH 12/12] hash: stop depending on `the_repository` in `null_oid()` Patrick Steinhardt
2025-03-04 20:16 ` Justin Tobler
2025-03-06 11:20 ` [PATCH 00/12] Stop depending on `the_repository` in object-related subsystems Karthik Nayak
2025-03-06 15:10 ` [PATCH v2 " Patrick Steinhardt
2025-03-06 15:10 ` [PATCH v2 01/12] csum-file: stop depending on `the_repository` Patrick Steinhardt
2025-03-06 15:10 ` [PATCH v2 02/12] object: " Patrick Steinhardt
2025-03-06 15:10 ` [PATCH v2 03/12] pack-write: stop depending on `the_repository` and `the_hash_algo` Patrick Steinhardt
2025-03-06 15:10 ` [PATCH v2 04/12] environment: move access to "core.bigFileThreshold" into repo settings Patrick Steinhardt
2025-03-06 15:10 ` [PATCH v2 05/12] pack-check: stop depending on `the_repository` Patrick Steinhardt
2025-03-06 15:10 ` [PATCH v2 06/12] pack-revindex: " Patrick Steinhardt
2025-03-06 15:10 ` [PATCH v2 07/12] pack-bitmap-write: " Patrick Steinhardt
2025-03-06 15:10 ` [PATCH v2 08/12] object-file-convert: " Patrick Steinhardt
2025-03-06 15:10 ` [PATCH v2 09/12] delta-islands: " Patrick Steinhardt
2025-03-06 15:10 ` [PATCH v2 10/12] object-file: split out logic regarding hash algorithms Patrick Steinhardt
2025-03-06 15:10 ` [PATCH v2 11/12] hash: fix "-Wsign-compare" warnings Patrick Steinhardt
2025-03-06 15:10 ` [PATCH v2 12/12] hash: stop depending on `the_repository` in `null_oid()` Patrick Steinhardt
2025-03-06 19:14 ` Junio C Hamano
2025-03-07 9:08 ` Patrick Steinhardt
2025-03-07 16:53 ` Junio C Hamano [this message]
2025-03-06 15:29 ` [PATCH v2 00/12] Stop depending on `the_repository` in object-related subsystems Karthik Nayak
2025-03-07 14:18 ` [PATCH v3 " Patrick Steinhardt
2025-03-07 14:18 ` [PATCH v3 01/12] csum-file: stop depending on `the_repository` Patrick Steinhardt
2025-03-07 14:18 ` [PATCH v3 02/12] object: " Patrick Steinhardt
2025-03-07 14:18 ` [PATCH v3 03/12] pack-write: stop depending on `the_repository` and `the_hash_algo` Patrick Steinhardt
2025-03-07 14:18 ` [PATCH v3 04/12] environment: move access to "core.bigFileThreshold" into repo settings Patrick Steinhardt
2025-03-07 14:18 ` [PATCH v3 05/12] pack-check: stop depending on `the_repository` Patrick Steinhardt
2025-03-07 14:18 ` [PATCH v3 06/12] pack-revindex: " Patrick Steinhardt
2025-03-07 14:19 ` [PATCH v3 07/12] pack-bitmap-write: " Patrick Steinhardt
2025-03-07 14:19 ` [PATCH v3 08/12] object-file-convert: " Patrick Steinhardt
2025-03-07 14:19 ` [PATCH v3 09/12] delta-islands: " Patrick Steinhardt
2025-03-07 14:19 ` [PATCH v3 10/12] object-file: split out logic regarding hash algorithms Patrick Steinhardt
2025-03-07 14:19 ` [PATCH v3 11/12] hash: fix "-Wsign-compare" warnings Patrick Steinhardt
2025-03-07 14:19 ` [PATCH v3 12/12] hash: stop depending on `the_repository` in `null_oid()` Patrick Steinhardt
2025-03-08 16:05 ` Elijah Newren
2025-03-10 7:11 ` Patrick Steinhardt
2025-03-10 22:37 ` Elijah Newren
2025-03-10 15:38 ` Junio C Hamano
2025-03-08 16:11 ` [PATCH v3 00/12] Stop depending on `the_repository` in object-related subsystems Elijah Newren
2025-03-10 7:13 ` [PATCH v4 " Patrick Steinhardt
2025-03-10 7:13 ` [PATCH v4 01/12] csum-file: stop depending on `the_repository` Patrick Steinhardt
2025-03-10 7:13 ` [PATCH v4 02/12] object: " Patrick Steinhardt
2025-03-10 7:13 ` [PATCH v4 03/12] pack-write: stop depending on `the_repository` and `the_hash_algo` Patrick Steinhardt
2025-03-10 7:13 ` [PATCH v4 04/12] environment: move access to "core.bigFileThreshold" into repo settings Patrick Steinhardt
2025-03-10 7:13 ` [PATCH v4 05/12] pack-check: stop depending on `the_repository` Patrick Steinhardt
2025-03-10 7:13 ` [PATCH v4 06/12] pack-revindex: " Patrick Steinhardt
2025-03-10 7:13 ` [PATCH v4 07/12] pack-bitmap-write: " Patrick Steinhardt
2025-03-10 7:13 ` [PATCH v4 08/12] object-file-convert: " Patrick Steinhardt
2025-03-10 7:13 ` [PATCH v4 09/12] delta-islands: " Patrick Steinhardt
2025-03-10 7:13 ` [PATCH v4 10/12] object-file: split out logic regarding hash algorithms Patrick Steinhardt
2025-03-10 7:13 ` [PATCH v4 11/12] hash: fix "-Wsign-compare" warnings Patrick Steinhardt
2025-03-10 7:13 ` [PATCH v4 12/12] hash: stop depending on `the_repository` in `null_oid()` Patrick Steinhardt
2025-03-10 22:39 ` [PATCH v4 00/12] Stop depending on `the_repository` in object-related subsystems Elijah Newren
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=xmqqbjucg4tu.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jltobler@gmail.com \
--cc=karthik.188@gmail.com \
--cc=ps@pks.im \
--cc=usmanakinyemi202@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;
as well as URLs for NNTP newsgroup(s).