Syntax for specifying a command in git config

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

 



Hi all,

Certain git config parameters (notably sendemail.smtpServer) expect an absolute path in order to use a command. If the value begins with a / git interprets it as a command; otherwise, it's interpreted it as a server hostname.

Using an absolute path is not very portable, however. If I want to have a common shared config file across multiple machines, each of which uses a command for smtpServer (e.g. msmtp) but installed at different locations, I have to modify the config file on each machine to update the absolute path.

Obviously this is not a *huge* deal, but it is a minor annoyance. I'm wondering if it would be possible to add a new syntax to config options like this. For example,

    [sendemail]
            smtpServer = !msmtp

The leading ! character says "the following value is a command that should be looked up in PATH". This is congruent with alias definitions, where the leading ! means to run the following value as a command directly instead of as a git subcommand.

This also is unambiguous since server hostnames will never begin with a ! character.

I would be happy to attempt a patch at this change if it's something the git maintainers are open to. And if there are any other options that this would make sense for, I can add those too.

Thanks,

Greg



[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