Samuel GROOT <samuel.gr...@grenoble-inp.org> writes:

> @@ -117,7 +124,7 @@ test_expect_success $PREREQ 'setup expect' '
>  '
>  
>  test_expect_success $PREREQ 'Verify commandline' '
> -     test_cmp expected commandline1
> +     test_cmp_noorder expected commandline1
>  '
>  
>  test_expect_success $PREREQ 'Send patches with --envelope-sender=auto' '

I think this comment applies to all the other hunk in this patch (I
didn't check very carefully though), but this is trying to see if
the command line arguments that drives send-email are like this (one
arg per line, enclosed in !! pairs for clarity):

        !pa...@example.com!
        !-i!
        !nob...@example.com!
        !aut...@example.com!
        !o...@example.com!
        !t...@example.com!

when these addresses are given from the command line:

        git send-email \
        --envelope-sender="Patch Contributor <pa...@example.com>" \
        --suppress-cc=sob \
        --from="Example <nob...@example.com>" \
        --to=nob...@example.com \
        --smtp-server="$(pwd)/fake.sendmail" $patches 2>errors

that creates something like

$TRASH_DIRECTORY/fake.sendmail -f pa...@example.com -i \
  nob...@example.com aut...@example.com o...@example.com t...@example.com

(all on a single line).

The earliest address pa...@example.com and later addresses have
quite different meaning (the first one is meant to be the envelope
sender address, and does not name a recipient). While I think it is
a good idea to tell the test that the order of recipient addresses
given to the sendmail command (i.e. nobody, author, one and two)
does not matter by comparing sorted list of addresses, sorting the
whole argument list and comparing is making the test _too_ loose.
Don't you want to catch a potential bug that adds the envelope
sender address to the list of recipients by mistake, for example?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to