<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/t4014-format-patch.sh, branch v2.40.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.40.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.40.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2023-02-17T23:43:09Z</updated>
<entry>
<title>format.attach: allow empty value to disable multi-part messages</title>
<updated>2023-02-17T23:43:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-02-17T23:33:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=50bebf98d96a6ccf2ca5c76da5dd8afff6933a4c'/>
<id>urn:sha1:50bebf98d96a6ccf2ca5c76da5dd8afff6933a4c</id>
<content type='text'>
When a lower precedence configuration file (e.g. /etc/gitconfig)
defines format.attach in any way, there was no way to disable it in
a more specific configuration file (e.g. $HOME/.gitconfig).

Change the behaviour of setting it to an empty string.  It used to
mean that the result is still a multipart message with only dashes
used as a multi-part separator, but now it resets the setting to
the default (which would be to give an inline patch, unless other
command line options are in effect).

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format-patch: support format.mboxrd with --stdout</title>
<updated>2022-12-25T07:32:45Z</updated>
<author>
<name>Eric Wong</name>
<email>e@80x24.org</email>
</author>
<published>2022-12-22T20:16:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4810946f6032a973ad752d06a32437bc9bb35e67'/>
<id>urn:sha1:4810946f6032a973ad752d06a32437bc9bb35e67</id>
<content type='text'>
mboxrd is a more robust output format when used with --stdout
and needs more exposure.  Introducing this config knob lets
users choose the more robust format for all their --stdout
uses.

Relying on --pretty=mboxrd and including all of pretty-formats.txt
in the `git format-patch' documentation would likely be
confusing to users.  Furthermore, this setting is useful across
multiple invocations.  So introduce `format.mboxrd' as a boolean
configuration knob that changes the default --pretty=email format
to --pretty=mboxrd when (and only when) --stdout is in use.

Signed-off-by: Eric Wong &lt;e@80x24.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t: convert egrep usage to "grep -E"</title>
<updated>2022-09-21T18:00:18Z</updated>
<author>
<name>Đoàn Trần Công Danh</name>
<email>congdanhqx@gmail.com</email>
</author>
<published>2022-09-21T13:02:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=81580fa06d85ef519a46b0b225cebfe71c168a37'/>
<id>urn:sha1:81580fa06d85ef519a46b0b225cebfe71c168a37</id>
<content type='text'>
Despite POSIX states that:

&gt; The old egrep and fgrep commands are likely to be supported for many
&gt; years to come as implementation extensions, allowing historical
&gt; applications to operate unmodified.

GNU grep 3.8 started to warn[1]:

&gt; The egrep and fgrep commands, which have been deprecated since
&gt; release 2.5.3 (2007), now warn that they are obsolescent and should
&gt; be replaced by grep -E and grep -F.

Prepare for their removal in the future.

[1]: https://lists.gnu.org/archive/html/info-gnu/2022-09/msg00001.html

Signed-off-by: Đoàn Trần Công Danh &lt;congdanhqx@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format-patch: learn format.forceInBodyFrom configuration variable</title>
<updated>2022-08-29T21:39:13Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-08-29T21:38:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d5fc07df688ace8c5a32f66b358ebd55cdaf4d28'/>
<id>urn:sha1:d5fc07df688ace8c5a32f66b358ebd55cdaf4d28</id>
<content type='text'>
As the need to use the "--force-in-body-from" option primarily is
tied to which mailing list the mails go to (and get their From:
address mangled), it is likely that a user who needs to use this
option once to interact with their upstream project needs to use it
for all patches they send out.

Add a configuration variable, suitable for setting in the local
configuration file per repository, for this.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format-patch: allow forcing the use of in-body From: header</title>
<updated>2022-08-29T21:39:13Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-08-29T21:38:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=34bc1b1045af6ad813f4de662a453b3c77ba65a7'/>
<id>urn:sha1:34bc1b1045af6ad813f4de662a453b3c77ba65a7</id>
<content type='text'>
Users may be authoring and committing their commits under the same
e-mail address they use to send their patches from, in which case
they shouldn't need to use the in-body From: line in their outgoing
e-mails.  At the receiving end, "git am" will use the address on the
"From:" header of the incoming e-mail and all should be well.

Some mailing lists, however, mangle the From: address from what the
original sender had; in such a situation, the user may want to add
the in-body "From:" header even for their own patches.

"git format-patch --[no-]force-in-body-from" was invented for such
users.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>2.36 format-patch regression fix</title>
<updated>2022-04-30T18:49:59Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2022-04-30T10:32:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=91f8f7e46fd86f2d20e93e00af451bf75febfe18'/>
<id>urn:sha1:91f8f7e46fd86f2d20e93e00af451bf75febfe18</id>
<content type='text'>
e900d494dc (diff: add an API for deferred freeing, 2021-02-11) added a
way to allow reusing diffopts: the no_free bit.  244c27242f (diff.[ch]:
have diff_free() call clear_pathspec(opts.pathspec), 2022-02-16) made
that mechanism mandatory.

git format-patch only sets no_free when --output is given, causing it to
forget pathspecs after the first commit.  Set no_free unconditionally
instead.

The existing test was unable to detect this breakage because it checks
stderr for the absence of a certain string, but format-patch writes to
stdout.  Also the test was not checking the case of one commit modifying
multiple files and a pathspec limiting the diff.  Replace it with a more
thorough one.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t4000-t4999: detect and signal failure within loop</title>
<updated>2021-12-13T18:29:48Z</updated>
<author>
<name>Eric Sunshine</name>
<email>sunshine@sunshineco.com</email>
</author>
<published>2021-12-09T05:11:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cbe1d9d630e529d3dd240eacf3d1c9799fef702b'/>
<id>urn:sha1:cbe1d9d630e529d3dd240eacf3d1c9799fef702b</id>
<content type='text'>
Failures within `for` and `while` loops can go unnoticed if not detected
and signaled manually since the loop itself does not abort when a
contained command fails, nor will a failure necessarily be detected when
the loop finishes since the loop returns the exit code of the last
command it ran on the final iteration, which may not be the command
which failed. Therefore, detect and signal failures manually within
loops using the idiom `|| return 1` (or `|| exit 1` within subshells).

Signed-off-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Reviewed-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>tests: use test_write_lines() to generate line-oriented output</title>
<updated>2021-12-13T18:29:48Z</updated>
<author>
<name>Eric Sunshine</name>
<email>sunshine@sunshineco.com</email>
</author>
<published>2021-12-09T05:11:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0849541268a3aca9381591aed87b6864a203709b'/>
<id>urn:sha1:0849541268a3aca9381591aed87b6864a203709b</id>
<content type='text'>
Take advantage of test_write_lines() to generate line-oriented output
rather than using for-loops or a series of `echo` commands. Not only is
test_write_lines() a natural fit for such a task, but there is less
opportunity for a broken &amp;&amp;-chain.

Signed-off-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Reviewed-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format-patch: allow a non-integral version numbers</title>
<updated>2021-03-23T19:49:47Z</updated>
<author>
<name>ZheNing Hu</name>
<email>adlternative@gmail.com</email>
</author>
<published>2021-03-23T11:12:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=db91988aa102d48af1c1203d8cc2d01240df7365'/>
<id>urn:sha1:db91988aa102d48af1c1203d8cc2d01240df7365</id>
<content type='text'>
The `-v&lt;n&gt;` option of `format-patch` can give nothing but an
integral iteration number to patches in a series.  Some people,
however, prefer to mark a new iteration with only a small fixup
with a non integral iteration number (e.g. an "oops, that was
wrong" fix-up patch for v4 iteration may be labeled as "v4.1").

Allow `format-patch` to take such a non-integral iteration
number.

`&lt;n&gt;` can be any string, such as '3.1' or '4rev2'. In the case
where it is a non-integral value, the "Range-diff" and "Interdiff"
headers will not include the previous version.

Signed-off-by: ZheNing Hu &lt;adlternative@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>tests: remove most uses of test_i18ncmp</title>
<updated>2021-02-11T07:48:27Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-02-11T01:53:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1108cea7f8ee38a8507c1cc68d1fafe2eb31d623'/>
<id>urn:sha1:1108cea7f8ee38a8507c1cc68d1fafe2eb31d623</id>
<content type='text'>
As a follow-up to d162b25f956 (tests: remove support for
GIT_TEST_GETTEXT_POISON, 2021-01-20) remove most uses of test_i18ncmp
via a simple s/test_i18ncmp/test_cmp/g search-replacement.

I'm leaving t6300-for-each-ref.sh out due to a conflict with in-flight
changes between "master" and "seen", as well as the prerequisite
itself due to other changes between "master" and "next/seen" which add
new test_i18ncmp uses.

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>
</feed>
