git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] send-email: expand paths in sendemail.{to,cc}cmd config

From
John Keeping <john@keeping.me.uk>
Date
Nov 24, 2015, 08:43 UTC
Message-ID
<20151124084353.GH21488@serenity.lan>
In-Reply-To
<CAPig+cRY3W4VMgqnRuQFeMk7oueKsA=ZhMAk15LLyZg0KfVvCA@mail.gmail.com>
On Mon, Nov 23, 2015 at 07:04:46PM -0500, Eric Sunshine wrote:
Show 9 quoted lines
> On Tue, Nov 17, 2015 at 5:01 PM, John Keeping <john@keeping.me.uk> wrote:
> > These configuration variables specify the paths to commands so we should
> > support tilde-expansion for files inside a user's home directory.
> 
> Hmm, I don't see anything in the documentation which says that these
> are paths to commands, and the code itself treats them purely as
> commands to be invoked, not as paths to commands. What is the
> behavior, for instance, with --tocmd='foobar -x zopp' or even
> --tocmd='foobar -x ~/zopp'?

The path behaviour only expands leading '~' and '~user' (as documented in git-config(1)):

	$ git -c sendemail.tocmd='foobar -x ~/zopp' config --path sendemail.tocmd
	foobar -x ~/zopp
Show 23 quoted lines
> > Signed-off-by: John Keeping <john@keeping.me.uk>
> > ---
> > diff --git a/git-send-email.perl b/git-send-email.perl
> > index 719c715..8e4c0e1 100755
> > --- a/git-send-email.perl
> > +++ b/git-send-email.perl
> > @@ -242,9 +242,7 @@ my %config_settings = (
> >      "smtpdomain" => \$smtp_domain,
> >      "smtpauth" => \$smtp_auth,
> >      "to" => \@initial_to,
> > -    "tocmd" => \$to_cmd,
> >      "cc" => \@initial_cc,
> > -    "cccmd" => \$cc_cmd,
> >      "aliasfiletype" => \$aliasfiletype,
> >      "bcc" => \@bcclist,
> >      "suppresscc" => \@suppress_cc,
> > @@ -259,6 +257,8 @@ my %config_settings = (
> >  my %config_path_settings = (
> >      "aliasesfile" => \@alias_files,
> >      "smtpsslcertpath" => \$smtp_ssl_cert_path,
> > +    "tocmd" => \$to_cmd,
> > +    "cccmd" => \$cc_cmd,
> >  );
Previous: Eric SunshineNext: Jeff King
Message 5 of 7 in “send-email config path expansion”
  1. 0/2 send-email config path expansionJohn Keeping, Nov 17, 2015
  2. 1/2 send-email: expand path in sendemail.smtpsslcertpath configJohn Keeping, Nov 17, 2015
  3. 2/2 send-email: expand paths in sendemail.{to,cc}cmd configJohn Keeping, Nov 17, 2015
  4. Eric SunshineNov 24, 2015
  5. John KeepingNov 24, 2015
  6. Jeff KingNov 24, 2015
  7. John KeepingNov 24, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.