git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Srujith A Poojary via GitGitGadgetNext: Srujith A Poojary via GitGitGadget
Message 17 of 18 in “t4041: use submodule repository for commit abbreviations”
  1. [Outreachy PATCH] t4041: use submodule repository for commit abbreviationsSrujith A Poojary via GitGitGadget, Oct 31, 2026
  2. Okhuomon AjayiOct 31, 2026
  3. Srujith PoojaryOct 31, 2026
  4. Submodule: use the submodule repository to abbreviate commitsSrujith A Poojary via GitGitGadget, Oct 31, 2026
  5. Okhuomon AjayiOct 31, 2026
  6. Srujith PoojaryOct 31, 2026
  7. submodule: use the submodule repository to abbreviate commitsSrujith A Poojary via GitGitGadget, Oct 31, 2026
  8. Junio C HamanoNov 1, 2026
  9. 0/2 [Outreachy PATCH] t4041: use submodule repository for commit abbreviationsSrujith A Poojary via GitGitGadget, Nov 2, 2026
  10. 1/2 submodule: use the submodule repository to abbreviate commitsSrujith A Poojary via GitGitGadget, Nov 2, 2026
  11. Srujith PoojaryNov 2, 2026
  12. 2/2 t4041: test SHA-256 submodule abbreviationsSrujith A Poojary via GitGitGadget, Nov 2, 2026
  13. Junio C HamanoNov 3, 2026
  14. Srujith PoojaryNov 4, 2026
  15. Junio C HamanoNov 3, 2026
  16. submodule: use the submodule repository to abbreviate commitsSrujith A Poojary via GitGitGadget, Nov 4, 2026
  17. Junio C HamanoNov 4, 2026
  18. submodule: use the submodule repository to abbreviate commitsSrujith A Poojary via GitGitGadget, Nov 4, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.