From: Siddharth Asthana Date: Tue, 12 Jul 2022 16:01:49 GMT Subject: Re: [PATCH v3 0/4] Add support for mailmap in cat-file Message-ID: <3167df9e-574c-cc00-1e00-43e81b049b6f@gmail.com> In-Reply-To: On 12/07/22 19:46, Junio C Hamano wrote: > Johannes Schindelin 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 " && >> echo "New " >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. > Thanks a ton Johannes and Junio for helping me fix the test :D Will squash the fix in v4!