Re: [PATCH v5] submodule: use the submodule repository to abbreviate commits
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 4, 2026, 14:38 UTC
- Message-ID
- <xmqqwlqs3bm7.fsf@gitster.g>
- In-Reply-To
- <pull.2288.v5.git.1793763781129.gitgitgadget@gmail.com>
"Srujith A Poojary via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 14 quoted lines
> From: Srujith A Poojary <poojarysrujith@gmail.com> > > The commit IDs shown in a submodule diff header belong to the > submodule's object database. However, strbuf_add_unique_abbrev() > uses the_repository, so it checks the superproject's object > database when abbreviating those IDs. > > Use the submodule repository when it is available, and fall back > to the repository from the diff options when it is not. > > The expected abbreviation for a submodule commit depends on the > repository's hash algorithm. Use test_oid_cache to provide the > expected value for each algorithm and remove the SHA1 prerequisite > so this test runs with both SHA-1 and SHA-256.
"remove"? What are you talking about???
Above the three-dash line, decribe the change to those who read _ONLY_ this iteration, not any earlier ones, because that is what "git log" readers will see. Perhaps write it more like
As the expected abbreviation depends on the hash algorithm used,
the test uses the test_oid mechanism to switch the expectation
between SHA-1 and SHA-256 repositories.or something, if you want to help readers who are not as familiar with our system and its test infrastructure as you are understand what you did.
> Signed-off-by: Srujith A Poojary <poojarysrujith@gmail.com> > ---
Here below the three-dash line is a place for you to describe what changed since the earlier rounds in your own words. Range-diff is added to aid it, but not as a replacement.
Changes since v4 is to squash two pieces into a single patch, as far as I can tell. Such a change is not visible in range-diff as #2 goes away, readers cannot tell where the additional material in #1 came from.
Overall it is looking good. Thanks.