Re: [PATCH v3] git-send-email: add option to specify sendmail command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> We want the shell that eats the command line of 'git send-email' to see
>
> 	--sendmail-cmd='$(pwd)/fake.sendmail'\" -f nobody@xxxxxxxxxxx"

Eh, sorry, but this is wrong.  It would have to be something like

	--sendmail-cmd='"$(pwd)/fake.sendmail" -f nobody@xxxxxxxxxxx'

The point is that the outer shell (i.e. the one that is eval'ing the
body of the test_expect_success) should just see and treat the path
to the sendmail-like program as "$(pwd)/fake.sendmail" as a literal
string including the surrounding double quotes and pass it down to
"git send-email", and the shell started by our "exec('sh','-c',...)"
thing will see what $(pwd) expands to, appends /fake.sendmail to it,
and treat the whole thing as a single "path to the program", that is
followed by two args, i.e. '-f' and 'nobody@xxxxxxxxxxx'.

And inside test_expect_success whose body is surrounded by a pair of
sq, we'd express a sq as '\'', so it becomes

	--sendmail-cmd='\''"$(pwd)/fake.sendmail" -f nobody@xxxxxxxxxxx'\''

in the test script, I would think.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux