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

Re: [RFH] adding test coverage for contrib/ in CI jobs

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 3, 2026, 21:26 UTC
Message-ID
<xmqq7bstsemv.fsf@gitster.g>
In-Reply-To
<xmqqsebhu9nn.fsf_-_@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 13 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
> ...
> Unfortunately, this seems to reveal existing other problems with
> subtree tests (t7900), in addition to diff-highlight tests (t9400)
> in various configurations.
>
>   https://github.com/git/git/actions/runs/21617099884
>
> This CI run is near the tip of 'seen', so there may be breakages
> attributable to new topics in flight, but I suspect that many of
> them are already in 'master', noticed by nobody because nobody ran
> these tests in these configurations (like "breaking changes",
> "sha256", "leaks", "reftable", "asan").

Test that comes with diff-highlight fails WITH_BREAKING_CHANGES CI job, which has multiple ways to work around. The easiest one is to force the branch name that is documented in the comment part of the test file that illustrates the topology of the history, which is what I picked.

----- >8 -----
Subject: diff-highlight: allow testing with Git 3.0 breaking changes

The diff-highlight (in contrib/) comes with its own test script, which relies on the initial branch name being 'master'. This is not just encoded in the test logic, but in the illustration in the file that shows the topology of the history.

Force the initial branch name to 'master' to allow it pass.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 contrib/diff-highlight/t/t9400-diff-highlight.sh | 2 ++
 1 file changed, 2 insertions(+)
diff --git c/contrib/diff-highlight/t/t9400-diff-highlight.sh w/contrib/diff-highlight/t/t9400-diff-highlight.sh
index f6f5195d00..dee296739c 100755
--- c/contrib/diff-highlight/t/t9400-diff-highlight.sh
+++ w/contrib/diff-highlight/t/t9400-diff-highlight.sh
@@ -10,6 +10,8 @@ DIFF_HIGHLIGHT="$CURR_DIR"/../diff-highlight
 CW="$(printf "\033[7m")"	# white
 CR="$(printf "\033[27m")"	# reset
 
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 . "$TEST_DIRECTORY"/test-lib.sh
 
 if ! test_have_prereq PERL
Previous: Junio C HamanoNext: Jeff King
Message 16 of 19 in “subtree: validate --prefix against commit in split”
  1. subtree: validate --prefix against commit in splitPushkar Singh, Jan 15, 2026
  2. subtree: validate --prefix against commit in splitPushkar Singh, Jan 15, 2026
  3. Junio C HamanoJan 15, 2026
  4. subtree: validate --prefix against commit in splitPushkar Singh, Jan 15, 2026
  5. Josh SteadmonFeb 2, 2026
  6. Junio C HamanoFeb 2, 2026
  7. Junio C HamanoFeb 2, 2026
  8. [RFH] adding test coverage for contrib/ in CI jobsJunio C Hamano, Feb 3, 2026
  9. Re* [RFH] adding test coverage for contrib/ in CI jobsJunio C Hamano, Feb 3, 2026
  10. Junio C HamanoFeb 3, 2026
  11. Re* [RFH] adding test coverage for contrib/ in CI jobsColin Stagner, Feb 4, 2026
  12. Junio C HamanoFeb 4, 2026
  13. Colin StagnerFeb 5, 2026
  14. Junio C HamanoFeb 5, 2026
  15. Junio C HamanoFeb 5, 2026
  16. Junio C HamanoFeb 3, 2026
  17. Jeff KingFeb 3, 2026
  18. subtree: validate --prefix against commit in splitPushkar Singh, Feb 3, 2026
  19. Junio C HamanoFeb 3, 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.