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

git-send-email does not use conditional configuration

From
KDKonstantinos Dalamagkidis <konstantinos@dalamagkidis.info>
Date
Sep 11, 2019, 06:14 UTC
Message-ID
<CANTPZbbLNJPEEeG8BgdDEVYS=gudz4SvqGe==28EQHXDXUxuwQ@mail.gmail.com>
Hello,

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

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@work.com

But when running git send-email the default sendmail is used:
% git send-email --dry-run 0001*
[...]
Dry-OK. Log says:
Sendmail: /usr/sbin/sendmail -i test@example.com dalamagkidis@work.com
From: Konstantinos Dalamagkidis <konstantinos@dalamagkidis.info>
To: test@example.com
Cc: Konstantinos Dalamagkidis <dalamagkidis@work.com>
[...]

If I move the sendemail section to the main gitconfig file, it works as expected. I normally use v2.20.1, but I could also reproduce this with v2.23.

Rgds Konstantinos

Next: Jeff King
Message 1 of 4 in “git-send-email does not use conditional configuration”
  1. Konstantinos DalamagkidisSep 11, 2019
  2. Jeff KingSep 11, 2019
  3. Konstantinos DalamagkidisSep 11, 2019
  4. Git.pm normalizes $GIT_DIR, was Re: git-send-email does not use conditional configurationJeff King, Sep 11, 2019

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.