<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/t4014-format-patch.sh, branch v2.23.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.23.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.23.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-06-13T20:19:42Z</updated>
<entry>
<title>Merge branch 'dl/format-patch-notes-config'</title>
<updated>2019-06-13T20:19:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-06-13T20:19:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e91f65d0e28b9f4dce85f82c5e3e208a54171a14'/>
<id>urn:sha1:e91f65d0e28b9f4dce85f82c5e3e208a54171a14</id>
<content type='text'>
"git format-patch" learns a configuration to set the default for
its --notes=&lt;ref&gt; option.

* dl/format-patch-notes-config:
  format-patch: teach format.notes config option
  git-format-patch.txt: document --no-notes option
</content>
</entry>
<entry>
<title>format-patch: teach format.notes config option</title>
<updated>2019-05-17T03:51:53Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2019-05-16T23:14:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=13cdf78094a5ba2968adb90707d27b98f53db1f7'/>
<id>urn:sha1:13cdf78094a5ba2968adb90707d27b98f53db1f7</id>
<content type='text'>
In git-format-patch, notes can be appended with the `--notes` option.
However, this must be specified by the user on an
invocation-by-invocation basis. If a user is not careful, it's possible
that they may forget to include it and generate a patch series without
notes.

Teach git-format-patch the `format.notes` config option. Its value is a
notes ref that will be automatically appended. The special value of
"standard" can be used to specify the standard notes. This option is
overridable with the `--no-notes` option in case a user wishes not to
append notes.

Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format-patch: make --base patch-id output stable</title>
<updated>2019-05-08T10:27:43Z</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@kernel.org</email>
</author>
<published>2019-04-26T23:51:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a8f6855f48fd474719e92eecc66c29a28fdc0f46'/>
<id>urn:sha1:a8f6855f48fd474719e92eecc66c29a28fdc0f46</id>
<content type='text'>
We weren't flushing the context each time we processed a hunk in the
patch-id generation code in diff.c, but we were doing that when we
generated "stable" patch-ids with the 'patch-id' tool. Let's port that
similar logic over from patch-id.c into diff.c so we can get the same
hash when we're generating patch-ids for 'format-patch --base=' types of
command invocations.

Cc: Xiaolong Ye &lt;xiaolong.ye@intel.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format-patch: inform user that patch-id generation is unstable</title>
<updated>2019-05-08T10:27:39Z</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@kernel.org</email>
</author>
<published>2019-04-26T23:51:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6f93d261fa8ca6a84c2e03e20558c0ddca3c05c3'/>
<id>urn:sha1:6f93d261fa8ca6a84c2e03e20558c0ddca3c05c3</id>
<content type='text'>
I tried out 'git format-patch --base' with a set of commits that
modifies more than one file. It turns out that the way this command is
implemented it actually uses the unstable version of patch-id instead of
the stable version that's documented. When I tried to modify the
existing test to use 'git patch-id --stable' vs. 'git patch-id
--unstable' I found that it didn't matter, the test still passed.

Let's expand on the test here so it is a little more complicated and
then use that to show that the patch-id generation is actually unstable
vs. stable. Update the documentation as well.

Cc: Xiaolong Ye &lt;xiaolong.ye@intel.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format-patch: notice failure to open cover letter for writing</title>
<updated>2019-02-22T22:25:35Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-02-22T19:26:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2fe95f494cde6cb3c3e6894bb687961b28b1764b'/>
<id>urn:sha1:2fe95f494cde6cb3c3e6894bb687961b28b1764b</id>
<content type='text'>
The make_cover_letter() function is supposed to open a new file for
writing, and let the caller write into it via FILE *rev-&gt;diffopt.file
but because the function does not return anything, the caller does not
bother checking the return value.

Make sure it dies, instead of keep going with a NULL output
filestream and relying on it to cause a crash, when it fails to
open the file.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format-patch: allow --interdiff to apply to a lone-patch</title>
<updated>2018-07-23T19:50:06Z</updated>
<author>
<name>Eric Sunshine</name>
<email>sunshine@sunshineco.com</email>
</author>
<published>2018-07-22T09:57:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ee6cbf712edcbd1dc14993ab2452fbe882dc524a'/>
<id>urn:sha1:ee6cbf712edcbd1dc14993ab2452fbe882dc524a</id>
<content type='text'>
When submitting a revised version of a patch or series, it can be
helpful (to reviewers) to include a summary of changes since the
previous attempt in the form of an interdiff, typically in the cover
letter. However, it is occasionally useful, despite making for a noisy
read, to insert an interdiff into the commentary section of the lone
patch of a 1-patch series.

Therefore, extend "git format-patch --interdiff=&lt;prev&gt;" to insert an
interdiff into the commentary section of a lone patch rather than
requiring a cover letter. The interdiff is indented to avoid confusing
git-am and human readers into considering it part of the patch proper.

Implementation note: Generating an interdiff for insertion into the
commentary section of a patch which itself is currently being generated
requires invoking the diffing machinery recursively. However, the
machinery does not (presently) support this since it uses global state.
Consequently, we need to take care to stash away the state of the
in-progress operation while generating the interdiff, and restore it
after.

Signed-off-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format-patch: teach --interdiff to respect -v/--reroll-count</title>
<updated>2018-07-23T19:50:06Z</updated>
<author>
<name>Eric Sunshine</name>
<email>sunshine@sunshineco.com</email>
</author>
<published>2018-07-22T09:57:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5ac290f9c00edb8963585c322fae9fb06a98167d'/>
<id>urn:sha1:5ac290f9c00edb8963585c322fae9fb06a98167d</id>
<content type='text'>
The --interdiff option introduces the embedded interdiff generically as
"Interdiff:", however, we can do better when --reroll-count is specified
by emitting "Interdiff against v{n}:" instead.

Signed-off-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format-patch: add --interdiff option to embed diff in cover letter</title>
<updated>2018-07-23T19:50:06Z</updated>
<author>
<name>Eric Sunshine</name>
<email>sunshine@sunshineco.com</email>
</author>
<published>2018-07-22T09:57:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=126facf8219177bc265be725a8579c86ebdf99a5'/>
<id>urn:sha1:126facf8219177bc265be725a8579c86ebdf99a5</id>
<content type='text'>
When submitting a revised version of a patch series, it can be helpful
(to reviewers) to include a summary of changes since the previous
attempt in the form of an interdiff, however, doing so involves manually
copy/pasting the diff into the cover letter.

Add an --interdiff option to automate this process. The argument to
--interdiff specifies the tip of the previous attempt against which to
generate the interdiff. For example:

    git format-patch --cover-letter --interdiff=v1 -3 v2

The previous attempt and the patch series being formatted must share a
common base.

Signed-off-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'xy/format-patch-prereq-patch-id-fix'</title>
<updated>2018-07-18T19:20:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-07-18T19:20:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2516b4711f6e180516162c384b7e94832e7189f6'/>
<id>urn:sha1:2516b4711f6e180516162c384b7e94832e7189f6</id>
<content type='text'>
Recently added "--base" option to "git format-patch" command did
not correctly generate prereq patch ids.

* xy/format-patch-prereq-patch-id-fix:
  format-patch: clear UNINTERESTING flag before prepare_bases
</content>
</entry>
<entry>
<title>format-patch: clear UNINTERESTING flag before prepare_bases</title>
<updated>2018-06-19T18:36:41Z</updated>
<author>
<name>Xiaolong Ye</name>
<email>xiaolong.ye@intel.com</email>
</author>
<published>2018-06-04T15:05:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=15b76c1fb3ab013b99498c9dca333aaa4808927e'/>
<id>urn:sha1:15b76c1fb3ab013b99498c9dca333aaa4808927e</id>
<content type='text'>
When users specify the commit range with 'Z..C' pattern for format-patch, all
the parents of Z (including Z) would be marked as UNINTERESTING which would
prevent revision walk in prepare_bases from getting the prerequisite commits,
thus `git format-patch --base &lt;base_commit_sha&gt; Z..C` won't be able to generate
the list of prerequisite patch ids. Clear UNINTERESTING flag with
clear_object_flags solves this issue.

Reported-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
Signed-off-by: Xiaolong Ye &lt;xiaolong.ye@intel.com&gt;
Reviewed-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
