Re: git-send-email does not use conditional configuration

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

 



On Wed, Sep 11, 2019 at 08:14:45AM +0200, Konstantinos Dalamagkidis wrote:

> In my git configuration, I have an includeif section for work
> related repositories that configures the user and sendemail
> sections.

What kind of includeIf are you using? Does it work with an
unconditional include? This seems to work for me:

  $ git config --global include.path one
  $ git config --file ~/one sendemail.smtpserver one.example.com
  $ git send-email --dry-run -1 --to nobody | grep ^Server
  Server: one.example.com

  $ git config --global includeIf.gitdir:$PWD/.path two
  $ git config --file ~/two sendemail.smtpserver two.example.com
  $ git send-email --dry-run -1 --to nobody | grep ^Server
  Server: two.example.com

I.e. both unconditional and gitdir includes work for me. If you do
something similar, what output do you get?

> I can verify that the configuration is read correctly by git:
> 
> % git config --get-regex "sendemail.*"
> sendemail.smtpencryption tls
> sendemail.smtpserver smtp.office365.com
> sendemail.smtpserverport 587
> sendemail.smtpuser dalamagkidis@xxxxxxxx

Thanks for this output. That rules out that "git config" is somehow
misbehaving in a way that normal internal config lookups wouldn't.

The rest of git-config should behave the same, but you could also try:

  git config --get sendemail.smtpserver

which is what send-email will actually run (you can run send-email with
GIT_TRACE=1 to see the full set of commands if you want to try them
manually).

-Peff



[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