Show 25 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> We are not installing this thing (yet), so how about giving an
>> instruction to run "perl contrib/contacts/git-contacts", only
>> assuming that the user is intelligent enough to be able to react to
>> "perl: not found" by installing it on their path?
>
> That is, something like this, perhaps.
>
> As the string given to --cc-cmd is stored in $cc_cmd, and is used in
> this call:
>
> push @cc, recipients_cmd("cc-cmd", "cc", $cc_cmd, $t, $quiet)
>
> where recipients_cmd takes ($prefix, $what, $cmd, $file, $quiet) and
> runs execute_cmd($prefix, $cmd, $file). execute_cmd in turn takes
> ($prefix, $cmd, $file) and does this:
>
> open my $fh, "-|", "$cmd \Q$file\E"
> or die sprintf(__("(%s) Could not execute '%s'"), $prefix, $cmd);
>
> IOW, $cmd is just an early part of a shell command line that takes a
> filename as its last argument, so I think it would be fine for $cmd
> to be "perl contrib/contacts/git-contacts". I did not test it, and
> it would be appreciated if people can test it.