Prarit Bhargava <prarit@xxxxxxxxxx> writes: > Use name and email definitions from test-lib.sh. > > Signed-off-by: Prarit Bhargava <prarit@xxxxxxxxxx> > --- > t/t4203-mailmap.sh | 94 +++++++++++++++++++++++----------------------- > 1 file changed, 47 insertions(+), 47 deletions(-) > > diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh > index 918ada69eb96..e8f9c0f5bc8c 100755 > --- a/t/t4203-mailmap.sh > +++ b/t/t4203-mailmap.sh > @@ -13,8 +13,8 @@ fuzz_blame () { > } > > test_expect_success setup ' > - cat >contacts <<-\EOF && > - A U Thor <author@xxxxxxxxxxx> > + cat >contacts <<- EOF && > + $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL> > nick1 <bugs@xxxxxxxxxx> > EOF > > @@ -33,19 +33,19 @@ test_expect_success 'check-mailmap no arguments' ' > ' > > test_expect_success 'check-mailmap arguments' ' > - cat >expect <<-\EOF && > - A U Thor <author@xxxxxxxxxxx> > + cat >expect <<- EOF && > + $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL> > nick1 <bugs@xxxxxxxxxx> > EOF > git check-mailmap \ > - "A U Thor <author@xxxxxxxxxxx>" \ > + "$GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL>" \ > "nick1 <bugs@xxxxxxxxxx>" >actual && > test_cmp expect actual > ' > > test_expect_success 'check-mailmap --stdin' ' > - cat >expect <<-\EOF && > - A U Thor <author@xxxxxxxxxxx> > + cat >expect <<- EOF && > + $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL> > nick1 <bugs@xxxxxxxxxx> > EOF > git check-mailmap --stdin <contacts >actual && Strictly speaking, the above is different from the ones that appear in the rest of this patch and the ones in step 1/3. The reason why you need to expect "author@xxxxxxxxxxx" in the output of check-mailmap is only because the same hardcoded string is used in the setup step of this test. The remainder of this file and step 1/3 are quite different and are all good changes. The commit the data comes from gets created with the value that happens to be set to GIT_AUTHOR_NAME in test-lib---if the assigned value changes over there, the tests that expect hardcoded "author@xxxxxxxxxxx" would break, and that makes the step 1/3 and the remainder of this patch good changes. In any case, I think all of 1/3 and 2/3 taken together are good preparatory steps for 3/3. Thanks, will queue.