<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-send-email.perl, branch v2.29.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.29.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.29.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-07-24T01:00:34Z</updated>
<entry>
<title>git-send-email: die if sendmail.* config is set</title>
<updated>2020-07-24T01:00:34Z</updated>
<author>
<name>Drew DeVault</name>
<email>sir@cmpwn.com</email>
</author>
<published>2020-07-24T00:44:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dd84e528a34c3822e7ab0473a95e411665b37681'/>
<id>urn:sha1:dd84e528a34c3822e7ab0473a95e411665b37681</id>
<content type='text'>
I've seen several people mis-configure git send-email on their first
attempt because they set the sendmail.* config options - not
sendemail.*. This patch detects this mistake and bails out with a
friendly warning.

Signed-off-by: Drew DeVault &lt;sir@cmpwn.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>send-email: restore --in-reply-to superseding behavior</title>
<updated>2020-07-01T23:12:21Z</updated>
<author>
<name>Rafael Aquini</name>
<email>aquini@redhat.com</email>
</author>
<published>2020-06-29T14:11:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f9f60d70663a89ff06fd38c806e47fc51f29ff72'/>
<id>urn:sha1:f9f60d70663a89ff06fd38c806e47fc51f29ff72</id>
<content type='text'>
git send-email --in-reply-to= fails to override In-Reply-To email headers,
if they're present in the output of format-patch, even when explicitly
told to do so by the option --no-thread, which breaks the contract of the
command line switch option, per its man page.

"
   --in-reply-to=&lt;identifier&gt;
       Make the first mail (or all the mails with --no-thread) appear as
       a reply to the given Message-Id, which avoids breaking threads to
       provide a new patch series.
"

This patch fixes the aformentioned issue, by bringing --in-reply-to's old
overriding behavior back.

The test was donated by Carlo Marcelo Arenas Belón.

Signed-off-by: Rafael Aquini &lt;aquini@redhat.com&gt;
Helped-by: Carlo Marcelo Arenas Belón &lt;carenas@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Fix spelling errors in code comments</title>
<updated>2019-11-10T07:00:54Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2019-11-05T17:07:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=15beaaa3d1f6b555900446deb5e376b4f806d734'/>
<id>urn:sha1:15beaaa3d1f6b555900446deb5e376b4f806d734</id>
<content type='text'>
Reported-by: Jens Schleusener &lt;Jens.Schleusener@fossies.org&gt;
Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ab/send-email-transferencoding-fix'</title>
<updated>2019-06-13T20:18:46Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-06-13T20:18:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=86d2271f06382ceeb66e891eff87166d858270e1'/>
<id>urn:sha1:86d2271f06382ceeb66e891eff87166d858270e1</id>
<content type='text'>
Since "git send-email" learned to take 'auto' as the value for the
transfer-encoding, it by mistake stopped honoring the values given
to the configuration variables sendemail.transferencoding and/or
sendemail.&lt;ident&gt;.transferencoding.  This has been corrected to
(finally) redoing the order of setting the default, reading the
configuration and command line options.

* ab/send-email-transferencoding-fix:
  send-email: fix regression in sendemail.identity parsing
  send-email: document --no-[to|cc|bcc]
  send-email: fix broken transferEncoding tests
  send-email: remove cargo-culted multi-patch pattern in tests
  send-email: do defaults -&gt; config -&gt; getopt in that order
  send-email: rename the @bcclist variable for consistency
  send-email: move the read_config() function above getopts
</content>
</entry>
<entry>
<title>send-email: fix regression in sendemail.identity parsing</title>
<updated>2019-05-29T17:33:39Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2019-05-17T19:55:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3ff15040e22676db0b369efbd8b908b8fcc9b38d'/>
<id>urn:sha1:3ff15040e22676db0b369efbd8b908b8fcc9b38d</id>
<content type='text'>
Fix a regression in my recent 3494dfd3ee ("send-email: do defaults -&gt;
config -&gt; getopt in that order", 2019-05-09). I missed that the
$identity variable needs to be extracted from the command-line before
we do the config reading, as it determines which config variable we
should read first. See [1] for the report.

The sendemail.identity feature was added back in
34cc60ce2b ("send-email: Add support for SSL and SMTP-AUTH",
2007-09-03), there were no tests to assert that it worked properly.

So let's fix both the regression, and add some tests to assert that
this is being parsed properly. While I'm at it I'm adding a
--no-identity option to go with --[to|cc|bcc] variable, since the
semantics are similar. It's like to/cc/bcc except that unlike those we
don't support multiple identities, but we could now easily add it
support for it if anyone cares.

In just fixing the --identity command-line parsing bug I discovered
that a narrow fix to that wouldn't do. In read_config() we had a state
machine that would only set config values if they weren't set already,
and thus by proxy we wouldn't e.g. set "to" based on sendemail.to if
we'd seen sendemail.gmail.to before, with --identity=gmail.

I'd modified some of the relevant code in 3494dfd3ee, but just
reverting to that wouldn't do, since it would bring back the
regression fixed in that commit.

Refactor read_config() do what we actually mean here. We don't want to
set a given sendemail.VAR if a sendemail.$identity.VAR previously set
it. The old code was conflating this desire with the hardcoded
defaults for these variables, and as discussed in 3494dfd3ee that was
never going to work. Instead pass along the state of whether an
identity config set something before, as distinguished from the state
of the default just being false, or the default being a non-bool or
true (e.g. --transferencoding).

I'm still not happy with the test coverage here, e.g. there's nothing
testing sendemail.smtpEncryption, but I only have so much time to fix
this code.

1. https://public-inbox.org/git/5cddeb61.1c69fb81.47ed4.e648@mx.google.com/

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>send-email: do defaults -&gt; config -&gt; getopt in that order</title>
<updated>2019-05-13T08:54:07Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2019-05-09T11:48:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3494dfd3ee058bbeab6a462673d9184dcd694a8b'/>
<id>urn:sha1:3494dfd3ee058bbeab6a462673d9184dcd694a8b</id>
<content type='text'>
Change the git-send-email command-line argument parsing and config
reading code to parse those two in the right order. I.e. first we set
our hardcoded defaults, then we read our config, and finally we read
the command-line, with later sets overriding earlier sets.

This fixes a bug introduced in e67a228cd8 ("send-email:
automatically determine transfer-encoding", 2018-07-08). That change
broke the reading of sendmail.transferencoding because it wasn't
careful to update the code to parse them in the previous "defaults
-&gt; getopt -&gt; config" order.

But as we can see from the history for this file doing it this way was
never what we actually wanted, it's just something we grew organically
as of 5483c71d7a ("git-send-email: make options easier to configure.",
2007-06-27) and have been dealing with the fallout since, e.g. in
463b0ea22b ("send-email: Fix %config_path_settings handling",
2011-10-14).

As can be seen in this change the only place where we actually want to
do something clever is with the to/cc/bcc variables, where setting
them on the command-line (or using --no-{to,cc,bcc}) should clear out
values we grab from the config.

All the rest are things where the command-line should simply override
the config values, and by reading the config first the config code
doesn't need all this "let's not set it, if it was on the command-line"
special-casing, as [1] shows we'd otherwise need to care about the
difference between whether something was a default or present in
config to fix the bug in e67a228cd8.

1. https://public-inbox.org/git/20190508105607.178244-2-gitster@pobox.com/

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>send-email: rename the @bcclist variable for consistency</title>
<updated>2019-05-13T08:11:49Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2019-05-09T11:48:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e60f6d13f3b04ee3a8aa50ed5a0b97d2fb58bad8'/>
<id>urn:sha1:e60f6d13f3b04ee3a8aa50ed5a0b97d2fb58bad8</id>
<content type='text'>
The "to" and "cc" variables are named @initial_{to,cc}, let's rename
this one to match them.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>send-email: move the read_config() function above getopts</title>
<updated>2019-05-13T08:11:49Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2019-05-09T11:48:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c573572c52758c4368ebc410d6b801fefa6bcbdd'/>
<id>urn:sha1:c573572c52758c4368ebc410d6b801fefa6bcbdd</id>
<content type='text'>
This is in preparation for a later change where we'll read the config
first before parsing command-line options. As the move detection will
show no lines (except one line of comment) is changed here, just moved
around.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'bs/sendemail-tighten-anything-by'</title>
<updated>2019-04-25T07:41:25Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-04-25T07:41:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=061ed420ec2dc97e2a922a6f02992869089cefb3'/>
<id>urn:sha1:061ed420ec2dc97e2a922a6f02992869089cefb3</id>
<content type='text'>
The recently added feature to add addresses that are on
anything-by: trailers in 'git send-email' was found to be way too
eager and considered nonsense strings as if they can be legitimate
beginning of *-by: trailer.  This has been tightened.

* bs/sendemail-tighten-anything-by:
  send-email: don't cc *-by lines with '-' prefix
</content>
</entry>
<entry>
<title>Merge branch 'bc/send-email-qp-cr'</title>
<updated>2019-04-25T07:41:25Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-04-25T07:41:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5983ddc165221c3ec2a4299b65cfb2ecc1ce7765'/>
<id>urn:sha1:5983ddc165221c3ec2a4299b65cfb2ecc1ce7765</id>
<content type='text'>
"git send-email" has been taught to use quoted-printable when the
payload contains carriage-return.  The use of the mechanism is in
line with the design originally added the codepath that chooses QP
when the payload has overly long lines.

* bc/send-email-qp-cr:
  send-email: default to quoted-printable when CR is present
</content>
</entry>
</feed>
