Hi Junio & Siddarth, On Sat, 9 Jul 2022, Junio C Hamano wrote: > Siddharth Asthana <siddharthasthana31@xxxxxxxxx> writes: > > > = Patch Organization > > > > - The first patch improves the commit_rewrite_person() by restricting it > > to traverse only through the header part of the commit object buffer. > > It also adds an argument called headers which the callers can pass. > > The function will replace idents only on these passed headers. > > Thus, the caller won't have to make repeated calls to the function. > > - The second patch moves commit_rewrite_person() to ident.c to expose it > > as a public function so that it can be used to replace idents in the > > headers of desired objects. > > - The third patch renames commit_rewrite_person() to a name which > > describes its functionality clearly. It is renamed to > > apply_mailmap_to_header(). > > - The last patch adds mailmap support to the git cat-file command. It > > adds the required documentation and tests as well. > > > > Changes in v3: > > - The decl-after-statement warnings have been fixed in all the patches. > > - In commit_rewrite_person(), the data type of linelen and i variables > > have been changed from int to size_t. > > - The return type of replace_idents_using_mailmap() function, size_t, > > has been explicitly typecasted to unsigned long using the > > cast_size_t_to_ulong() helper method. > > https://github.com/git/git/actions/runs/2642867380 seems to tell us > that tests added by this series are broken on Windows. I am not > sure what exactly in this series depends on being LF-only system, > but the symptom makes me suspect that is the cause of the problem. It has nothing to do with LF-only, but everything to do with symlinks (I suspected that when I saw the skipped test cases at https://github.com/git/git/runs/7292710632?check_suite_focus=true#step:5:195, and could validate that suspicion via disabling the test cases by inverting the prereq: this caused the very same symptoms even in a Linux setup): -- snipsnap -- >From 5bc6d52c95401f60e67312823ed406bd5a3c1026 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin <johannes.schindelin@xxxxxx> Date: Tue, 12 Jul 2022 14:28:05 +0200 Subject: [PATCH] fixup??? cat-file: add mailmap support 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. Let's fix that by removing the prereq from the `set up` test case, and adjusting its title to reflect its broadened responsibility. Signed-off-by: Johannes Schindelin <johannes.schindelin@xxxxxx> --- t/t4203-mailmap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh index c60a90615cc..94afd4717a2 100755 --- a/t/t4203-mailmap.sh +++ b/t/t4203-mailmap.sh @@ -932,7 +932,7 @@ test_expect_success 'find top-level mailmap from subdir' ' test_cmp expect actual ' -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@xxxxxxxxxxx>" && echo "New <new@xxxxxxxxxxx> <orig@xxxxxxxxxxx>" >map && rm -f .mailmap -- 2.37.0.rc2.windows.1.7.g45a475aeb84