Re: [RFH] adding test coverage for contrib/ in CI jobs
- From
Jeff King <peff@peff.net>
- Date
- Feb 3, 2026, 21:53 UTC
- Message-ID
- <20260203215347.GA340210@coredump.intra.peff.net>
- In-Reply-To
- <xmqq7bstsemv.fsf@gitster.g>
On Tue, Feb 03, 2026 at 01:26:00PM -0800, Junio C Hamano wrote:
Show 11 quoted lines
> ----- >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>
Thanks, I think this is a fine solution. In such cases it is sometimes nice to remove the dependence on the branch name entirely. But it looks like it would be a pain to do so in this case, and not worth the time.
Most of the other instances of GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME set it to "main". I guess one day in the future, post v3.0, we might drop all of those and decide that "main" is here to stay. In which case we might also want to drop these outliers and just switch them to "main", too. But I am content to punt that off to another day.
-Peff
PS As you might have guessed, I have not run these tests in ages. I'd only do so when actually changing something in diff-highlight, and that hasn't happened in a while. In fact, I rarely run it at all these days; I usually use the third-party "delta" program in its "--color-only" mode, as it does a better job of true intra-line tokenization and diffing.
I don't know what that means for diff-highlight. I'm happy to continue to review patches for it, and I think it mostly Just Works and doesn't need active maintenance. But I'm also OK if we dropped it.