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