Hi Ævar, On Fri, 17 May 2019, Ævar Arnfjörð Bjarmason wrote: > diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh > index 61d484d1a6..890e2874c3 100755 > --- a/t/t9001-send-email.sh > +++ b/t/t9001-send-email.sh > @@ -1228,6 +1228,61 @@ test_expect_success $PREREQ 'sendemail.to works' ' > grep "To: Somebody " stdout > ' > > +test_expect_success $PREREQ 'setup sendemail.identity' ' > + git config --replace-all sendemail.to "default@example.com" && > + git config --replace-all sendemail.isp.to "isp@example.com" && > + git config --replace-all sendemail.cloud.to "cloud@example.com" > +' > + > +test_expect_success $PREREQ 'sendemail.identity: reads the correct identity config' ' > + git -c sendemail.identity=cloud send-email \ > + --dry-run \ > + --from="nobody@example.com" \ > + $patches >stdout && > + grep "To: cloud@example.com" stdout > +' > + > +test_expect_success $PREREQ 'sendemail.identity: identity overrides sendemail.identity' ' > + git -c sendemail.identity=cloud send-email \ > + --identity=isp \ > + --dry-run \ > + --from="nobody@example.com" \ > + $patches >stdout && > + grep "To: isp@example.com" stdout > +' > + > +test_expect_success $PREREQ 'sendemail.identity: --no-identity clears previous identity' ' > + git -c sendemail.identity=cloud send-email \ > + --no-identity \ > + --dry-run \ > + --from="nobody@example.com" \ > + $patches >stdout && > + grep "To: default@example.com" stdout > +' > + > +test_expect_success $PREREQ 'sendemail.identity: bool identity variable existance overrides' ' > + git -c sendemail.identity=cloud \ > + -c sendemail.xmailer=true \ > + -c sendemail.cloud.xmailer=false \ > + send-email \ > + --dry-run \ > + --from="nobody@example.com" \ > + $patches >stdout && > + grep "To: cloud@example.com" stdout && > + ! grep "X-Mailer" stdout > +' > + > +test_expect_success $PREREQ 'sendemail.identity: bool variable fallback' ' > + git -c sendemail.identity=cloud \ > + -c sendemail.xmailer=false \ > + send-email \ > + --dry-run \ > + --from="nobody@example.com" \ > + $patches >stdout && > + grep "To: cloud@example.com" stdout && > + ! grep "X-Mailer" stdout > +' > + These test cases all diligently use the `$PREREQ` prerequisite, but... > test_expect_success $PREREQ '--no-to overrides sendemail.to' ' > git send-email \ > --dry-run \ > @@ -1785,6 +1840,15 @@ test_expect_success '--dump-aliases must be used alone' ' > test_must_fail git send-email --dump-aliases --to=janice@example.com -1 refs/heads/accounting > ' > > +test_expect_success 'aliases and sendemail.identity' ' > + test_must_fail git \ > + -c sendemail.identity=cloud \ > + -c sendemail.aliasesfile=default-aliases \ > + -c sendemail.cloud.aliasesfile=cloud-aliases \ > + send-email -1 2>stderr && > + test_i18ngrep "cloud-aliases" stderr > +' > + This one is missing it. That breaks the Windows job in our Azure Pipeline where we leave out all of the Perl bits (to accelerate the tests somewhat). Ciao, Dscho > test_sendmail_aliases () { > msg="$1" && shift && > expect="$@" && > -- > 2.21.0.1020.gf2820cf01a > > >