On Mon, Nov 14, 2022 at 02:58:29AM +0530, Siddharth Asthana wrote: > @@ -1051,4 +1051,34 @@ test_expect_success 'git cat-file -s returns correct size with --use-mailmap for > test_cmp expect actual > ' > > +test_expect_success 'git cat-file --batch-check returns correct size with --use-mailmap' ' > + test_when_finished "rm .mailmap" && > + cat >.mailmap <<-\EOF && > + C O Mitter <committer@xxxxxxxxxxx> Orig <orig@xxxxxxxxxxx> > + EOF > + cat >expect <<-\EOF && > + 92d99959b011b1cd69fe7be5315d6732fe302575 commit 209 > + 92d99959b011b1cd69fe7be5315d6732fe302575 commit 220 > + EOF > + echo "HEAD" >in && > + git cat-file --batch-check <in >actual && > + git cat-file --use-mailmap --batch-check <in >>actual && > + test_cmp expect actual > +' > + > +test_expect_success 'git cat-file --batch-command returns correct size with --use-mailmap' ' > + test_when_finished "rm .mailmap" && > + cat >.mailmap <<-\EOF && > + C O Mitter <committer@xxxxxxxxxxx> Orig <orig@xxxxxxxxxxx> > + EOF > + cat >expect <<-\EOF && > + 92d99959b011b1cd69fe7be5315d6732fe302575 commit 209 > + 92d99959b011b1cd69fe7be5315d6732fe302575 commit 220 > + EOF > + echo "info HEAD" >in && > + git cat-file --batch-command <in >actual && > + git cat-file --use-mailmap --batch-command <in >>actual && > + test_cmp expect actual > +' > + > test_done These two tests (and the -s ones above it) are not going to work when run under SHA-256 mode, i.e., with 'GIT_TEST_DEFAULT_HASH=sha256' in the environment: not ok 66 - git cat-file -s returns correct size with --use-mailmap not ok 67 - git cat-file -s returns correct size with --use-mailmap for tag objects not ok 68 - git cat-file --batch-check returns correct size with --use-mailmap not ok 69 - git cat-file --batch-command returns correct size with --use-mailmap Thanks, Taylor