<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/t4014-format-patch.sh, 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-10-01T22:22:10Z</updated>
<entry>
<title>format-patch: teach format.useAutoBase "whenAble" option</title>
<updated>2020-10-01T22:22:10Z</updated>
<author>
<name>Jacob Keller</name>
<email>jacob.keller@gmail.com</email>
</author>
<published>2020-10-01T21:46:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7efba5fa39fa1608fccea51a849b36b0f85825bb'/>
<id>urn:sha1:7efba5fa39fa1608fccea51a849b36b0f85825bb</id>
<content type='text'>
The format.useAutoBase configuration option exists to allow users to
enable '--base=auto' for format-patch by default.

This can sometimes lead to poor workflow, due to unexpected failures
when attempting to format an ancient patch:

    $ git format-patch -1 &lt;an old commit&gt;
    fatal: base commit shouldn't be in revision list

This can be very confusing, as it is not necessarily immediately obvious
that the user requested a --base (since this was in the configuration,
not on the command line).

We do want --base=auto to fail when it cannot provide a suitable base,
as it would be equally confusing if a formatted patch did not include
the base information when it was requested.

Teach format.useAutoBase a new mode, "whenAble". This mode will cause
format-patch to attempt to include a base commit when it can. However,
if no valid base commit can be found, then format-patch will continue
formatting the patch without a base commit.

In order to avoid making yet another branch name unusable with --base,
do not teach --base=whenAble or --base=whenable.

Instead, refactor the base_commit option to use a callback, and rely on
the global configuration variable auto_base.

This does mean that a user cannot request this optional base commit
generation from the command line. However, this is likely not too
valuable. If the user requests base information manually, they will be
immediately informed of the failure to acquire a suitable base commit.
This allows the user to make an informed choice about whether to
continue the format.

Add tests to cover the new mode of operation for --base.

Signed-off-by: Jacob Keller &lt;jacob.keller@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'pb/t4014-unslave'</title>
<updated>2020-06-25T19:27:48Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-06-25T19:27:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f33b5bddaf7ac1535c6c37fde168597e252872b3'/>
<id>urn:sha1:f33b5bddaf7ac1535c6c37fde168597e252872b3</id>
<content type='text'>
A branch name used in a test has been clarified to match what is
going on.

* pb/t4014-unslave:
  t4014: do not use "slave branch" nomenclature
</content>
</entry>
<entry>
<title>t4014: do not use "slave branch" nomenclature</title>
<updated>2020-06-19T17:26:34Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2020-06-19T09:32:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=08dc26061f3ff9ee79e6cfda88f0c825b8730e54'/>
<id>urn:sha1:08dc26061f3ff9ee79e6cfda88f0c825b8730e54</id>
<content type='text'>
Git branches have been qualified as topic branches, integration branches,
development branches, feature branches, release branches and so on.
Git has a branch that is the master *for* development, but it is not
the master *of* any "slave branch": Git does not have slave branches,
and has never had, except for a single testcase that claims otherwise. :)

Independent of any future change to the naming of the "master" branch,
removing this sole appearance of the term is a strict improvement: it
avoids divisive language, and talking about "feature branch" clarifies
which developer workflow the test is trying to emulate.

Reported-by: Till Maas &lt;tmaas@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff: add config option relative</title>
<updated>2020-05-24T23:23:59Z</updated>
<author>
<name>Laurent Arnoud</name>
<email>laurent@spkdev.net</email>
</author>
<published>2020-05-22T10:46:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c28ded83fc95be8157c851c8be179733a7d4b137'/>
<id>urn:sha1:c28ded83fc95be8157c851c8be179733a7d4b137</id>
<content type='text'>
The `diff.relative` boolean option set to `true` shows only changes in
the current directory/value specified by the `path` argument of the
`relative` option and shows pathnames relative to the aforementioned
directory.

Teach `--no-relative` to override earlier `--relative`

Add for git-format-patch(1) options documentation `--relative` and
`--no-relative`

Signed-off-by: Laurent Arnoud &lt;laurent@spkdev.net&gt;
Acked-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: teach --no-encode-email-headers</title>
<updated>2020-04-08T05:37:18Z</updated>
<author>
<name>Emma Brooks</name>
<email>me@pluvano.com</email>
</author>
<published>2020-04-08T04:31:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=19d097e3d73b4d3635bbe0e8735b2f059d59f29a'/>
<id>urn:sha1:19d097e3d73b4d3635bbe0e8735b2f059d59f29a</id>
<content type='text'>
When commit subjects or authors have non-ASCII characters, git
format-patch Q-encodes them so they can be safely sent over email.
However, if the patch transfer method is something other than email (web
review tools, sneakernet), this only serves to make the patch metadata
harder to read without first applying it (unless you can decode RFC 2047
in your head). git am as well as some email software supports
non-Q-encoded mail as described in RFC 6531.

Add --[no-]encode-email-headers and format.encodeEmailHeaders to let the
user control this behavior.

Signed-off-by: Emma Brooks &lt;me@pluvano.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'dl/format-patch-notes-config-fixup'</title>
<updated>2019-12-25T19:21:58Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-12-25T19:21:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=17066bea38d14a9f9a7a174f40cd9dc1fd720210'/>
<id>urn:sha1:17066bea38d14a9f9a7a174f40cd9dc1fd720210</id>
<content type='text'>
"git format-patch" can take a set of configured format.notes values
to specify which notes refs to use in the log message part of the
output.  The behaviour of this was not consistent with multiple
--notes command line options, which has been corrected.

* dl/format-patch-notes-config-fixup:
  notes.h: fix typos in comment
  notes: break set_display_notes() into smaller functions
  config/format.txt: clarify behavior of multiple format.notes
  format-patch: move git_config() before repo_init_revisions()
  format-patch: use --notes behavior for format.notes
  notes: extract logic into set_display_notes()
  notes: create init_display_notes() helper
  notes: rename to load_display_notes()
</content>
</entry>
<entry>
<title>format-patch: use --notes behavior for format.notes</title>
<updated>2019-12-09T21:37:20Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2019-12-09T13:10:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8164c961e16834da283cbf5ac5d22313b982a484'/>
<id>urn:sha1:8164c961e16834da283cbf5ac5d22313b982a484</id>
<content type='text'>
When we had multiple `format.notes` config values where we had `&lt;ref1&gt;`,
`false`, `&lt;ref2&gt;` (in that order), then we would print out the notes for
both `&lt;ref1&gt;` and `&lt;ref2&gt;`. This doesn't make sense, however, since we
parse the config in a top-down manner and a `false` should be able to
override previous configurations, just like how `--no-notes` will
override previous `--notes`.

Duplicate the logic that handles the `--[no-]notes[=]` option to
`format.notes` for consistency. As a result, when parsing the config
from top to bottom, `format.notes = true` will behave like `--notes`,
`format.notes = &lt;ref&gt;` will behave like `--notes=&lt;ref&gt;` and
`format.notes = false` will behave like `--no-notes`.

This change isn't strictly backwards compatible but since it is an edge
case where a sane user would not mix notes refs with `false` and this
feature is relatively new (released only in v2.23.0), this change should
be harmless.

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: teach --no-base</title>
<updated>2019-12-05T14:06:18Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2019-12-04T21:25:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=945dc55dda595a3e5449017797cb90599ed9ecb5'/>
<id>urn:sha1:945dc55dda595a3e5449017797cb90599ed9ecb5</id>
<content type='text'>
If `format.useAutoBase = true`, there was no way to override this from
the command-line. Teach the `--no-base` option in format-patch to
override `format.useAutoBase`.

Helped-by: René Scharfe &lt;l.s.r@web.de&gt;
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>t4014: use test_config()</title>
<updated>2019-12-05T14:06:18Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2019-12-04T21:25:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=700e006c5d69990fc1167355e9fa7a55e9166581'/>
<id>urn:sha1:700e006c5d69990fc1167355e9fa7a55e9166581</id>
<content type='text'>
Instead of manually unsetting the config after the test case is done,
use test_config() to do it automatically. While we're at it, fix a typo
in a test case name.

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>Merge branch 'dl/format-patch-cover-from-desc'</title>
<updated>2019-11-10T09:02:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-11-10T09:02:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b75ba9bbd13877ff3351e150d3d053baec81f0db'/>
<id>urn:sha1:b75ba9bbd13877ff3351e150d3d053baec81f0db</id>
<content type='text'>
The branch description ("git branch --edit-description") has been
used to fill the body of the cover letters by the format-patch
command; this has been enhanced so that the subject can also be
filled.

* dl/format-patch-cover-from-desc:
  format-patch: teach --cover-from-description option
  format-patch: use enum variables
  format-patch: replace erroneous and condition
</content>
</entry>
</feed>
