Subject: Re: [PATCH v3 0/4] Add support for mailmap in cat-file

From: Junio C Hamano <[email-masked]>
Date: Tue, 12 Jul 2022 07:16:16 -0700

Johannes Schindelin <[email-masked]> writes:

> This patch introduced new test cases that rely on the side effects of
> the earlier test case `set up symlink tests`. However, that test case is
> guarded behind the `SYMLINKS` prereq, therefore it is not run e.g. on
> Windows.

Ah, that explains why it only fails there.

> Let's fix that by removing the prereq from the `set up` test case, and
> adjusting its title to reflect its broadened responsibility.
>
> -test_expect_success SYMLINKS 'set up symlink tests' '
> +test_expect_success 'set up symlink/--use-mailmap tests' '
>  	git commit --allow-empty -m foo --author="Orig <[email-masked]>" &&
>  	echo "New <[email-masked]> <[email-masked]>" >map &&
>  	rm -f .mailmap

OK, this sets up

 * one commit that can be used in a test, authored by "Orig" person;
 * the "map" file that maps the "Orig" person; and
 * ensures .mailmap is not there.

with the intention to make a symbolic link that points at the "map"
to use as the mailmap file in later tests.  This step does not require
symbolic links at all, but because the point of this set-up is to serve
the later tests, all requiring symbolic link support, it was OK to have
the prerequisite.

The cat-file tests does not have to use the "map" file to do its
thing at all.  In fact, these tests prepare their own .mailmap file
inside them.  But because it chose to run in the history prepared by
previous tests, it broke, because without SYMLINKS, the sought-for
commit does not get created.

Makes sense.  I would have retitled it to s/set up/prepare for/ but
that is minor.

Thanks.  Siddharth, please squash the fix in when rerolling.