Re: [PATCH v3 0/4] Add support for mailmap in cat-file
- From
Siddharth Asthana <siddharthasthana31@gmail.com>
- Date
- Jul 12, 2022, 16:01 UTC
- Message-ID
- <3167df9e-574c-cc00-1e00-43e81b049b6f@gmail.com>
- In-Reply-To
- <xmqqwnciifgv.fsf@gitster.g>
On 12/07/22 19:46, Junio C Hamano wrote:
Show 41 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> 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 <orig@example.com>" && >> echo "New <new@example.com> <orig@example.com>" >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!