<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/git-format-patch.txt, branch v2.46.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.46.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.46.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2024-05-28T18:17:10Z</updated>
<entry>
<title>Merge branch 'jc/format-patch-more-aggressive-range-diff'</title>
<updated>2024-05-28T18:17:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-05-28T18:17:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b32f298264d9df8febc9942c196eaf7e82c86184'/>
<id>urn:sha1:b32f298264d9df8febc9942c196eaf7e82c86184</id>
<content type='text'>
The default "creation-factor" used by "git format-patch" has been
raised to make it more aggressively find matching commits.

* jc/format-patch-more-aggressive-range-diff:
  format-patch: run range-diff with larger creation-factor
</content>
</entry>
<entry>
<title>format-patch: run range-diff with larger creation-factor</title>
<updated>2024-05-06T18:57:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-05-06T16:40:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c22d41d641711879c57299244ae13b6c4a215fee'/>
<id>urn:sha1:c22d41d641711879c57299244ae13b6c4a215fee</id>
<content type='text'>
We see too often that a range-diff added to format-patch output
shows too many "unmatched" patches.  This is because the default
value for creation-factor is set to a relatively low value.

It may be justified for other uses (like you have a yet-to-be-sent
new iteration of your series, and compare it against the 'seen'
branch that has an older iteration, probably with the '--left-only'
option, to pick out only your patches while ignoring the others) of
"range-diff" command, but when the command is run as part of the
format-patch, the user _knows_ and expects that the patches in the
old and the new iterations roughly correspond to each other, so we
can and should use a much higher default.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format-patch: "--rfc=-(WIP)" appends to produce [PATCH (WIP)]</title>
<updated>2024-04-23T18:00:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-04-23T17:52:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ce36894509bac4c03fd524fc668b1e43d6e56ee1'/>
<id>urn:sha1:ce36894509bac4c03fd524fc668b1e43d6e56ee1</id>
<content type='text'>
In the previous step, the "--rfc" option of "format-patch" learned
to take an optional string value to prepend to the subject prefix,
so that --rfc=WIP can give "[WIP PATCH]".

There may be cases in which the extra string wants to come after the
subject prefix.  Extend the mechanism to allow "--rfc=-(WIP)" [*] to
signal that the extra string is to be appended instead of getting
prepended, resulting in "[PATCH (WIP)]".

In the documentation, discourage (ab)using "--rfc=-RFC" to say
"[PATCH RFC]" just to be different, when "[RFC PATCH]" is the norm.

[Footnote]

 * The syntax takes inspiration from Perl's open syntax that opens
   pipes "open fh, '|-', 'cmd'", where the dash signals "the other
   stuff comes here".

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format-patch: allow --rfc to optionally take a value, like --rfc=WIP</title>
<updated>2024-04-23T18:00:38Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-04-23T17:52:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ce48fb2eabccc269443f33d0f148d0061b94a101'/>
<id>urn:sha1:ce48fb2eabccc269443f33d0f148d0061b94a101</id>
<content type='text'>
With the "--rfc" option, we can tweak the "[PATCH]" (or whatever
string specified with the "--subject-prefix" option, instead of
"PATCH") that we prefix the title of the commit with into "[RFC
PATCH]", but some projects may want "[rfc PATCH]".  Adding a new
option, e.g., "--rfc-lowercase", to support such need every time
somebody wants to use different strings would lead to insanity of
accumulating unbounded number of such options.

Allow an optional value specified for the option, so that users can
use "--rfc=rfc" (think of "--rfc" without value as a short-hand for
"--rfc=RFC") if they wanted to.

This can of course be (ab)used to make the prefix "[WIP PATCH]" by
passing "--rfc=WIP".  Passing an empty string, i.e., "--rfc=", is
the same as "--no-rfc" to override an option given earlier on the
same command line.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: enforce dashes in placeholders</title>
<updated>2023-12-26T19:06:55Z</updated>
<author>
<name>Jean-Noël Avila</name>
<email>jn.avila@free.fr</email>
</author>
<published>2023-12-25T21:21:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2162f9f6f86df4f49c3a716b5beb3952104ea8b8'/>
<id>urn:sha1:2162f9f6f86df4f49c3a716b5beb3952104ea8b8</id>
<content type='text'>
The CodingGuidelines documents stipulates that multi-word placeholders
are to be separated by dashes, not underscores nor spaces.

Signed-off-by: Jean-Noël Avila &lt;jn.avila@free.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'js/update-urls-in-doc-and-comment'</title>
<updated>2023-12-18T22:10:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-12-18T22:10:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ec5ab1482d3373052784ae5c49d96d8b5cdd139d'/>
<id>urn:sha1:ec5ab1482d3373052784ae5c49d96d8b5cdd139d</id>
<content type='text'>
Stale URLs have been updated to their current counterparts (or
archive.org) and HTTP links are replaced with working HTTPS links.

* js/update-urls-in-doc-and-comment:
  doc: refer to internet archive
  doc: update links for andre-simon.de
  doc: switch links to https
  doc: update links to current pages
</content>
</entry>
<entry>
<title>doc: update links to current pages</title>
<updated>2023-11-26T01:07:05Z</updated>
<author>
<name>Josh Soref</name>
<email>jsoref@gmail.com</email>
</author>
<published>2023-11-24T03:35:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=65175d9ea26bebeb9d69977d0e75efc0e88dbced'/>
<id>urn:sha1:65175d9ea26bebeb9d69977d0e75efc0e88dbced</id>
<content type='text'>
It's somewhat traditional to respect sites' self-identification.

Signed-off-by: Josh Soref &lt;jsoref@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>documentation: fix subject/verb agreement</title>
<updated>2023-10-09T19:06:29Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-10-08T06:45:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ce14cc0b00098201f967346955804abd774174ea'/>
<id>urn:sha1:ce14cc0b00098201f967346955804abd774174ea</id>
<content type='text'>
Diff best viewed with --color-diff.

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 'dd/format-patch-rfc-updates'</title>
<updated>2023-09-07T22:06:08Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-09-07T22:06:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=09684a12b05b6c01c638cb14e3d765a93d154e32'/>
<id>urn:sha1:09684a12b05b6c01c638cb14e3d765a93d154e32</id>
<content type='text'>
"git format-patch --rfc --subject-prefix=&lt;foo&gt;" used to ignore the
"--subject-prefix" option and used "[RFC PATCH]"; now we will add
"RFC" prefix to whatever subject prefix is specified.

This is a backward compatible change that may deserve a note.

* dd/format-patch-rfc-updates:
  format-patch: --rfc honors what --subject-prefix sets
</content>
</entry>
<entry>
<title>format-patch: --rfc honors what --subject-prefix sets</title>
<updated>2023-08-31T22:02:21Z</updated>
<author>
<name>Drew DeVault</name>
<email>sir@cmpwn.com</email>
</author>
<published>2023-08-30T06:43:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e0d7db7423a91673c001aaa5e580c815ce2f7f92'/>
<id>urn:sha1:e0d7db7423a91673c001aaa5e580c815ce2f7f92</id>
<content type='text'>
Rather than replacing the configured subject prefix (either through the
git config or command line) entirely with "RFC PATCH", this change
prepends RFC to whatever subject prefix was already in use.

This is useful, for example, when a user is working on a repository that
has a subject prefix considered to disambiguate patches:

	git config format.subjectPrefix 'PATCH my-project'

Prior to this change, formatting patches with --rfc would lose the
'my-project' information.

The data flow for the subject-prefix was that rev.subject_prefix
were to be kept the authoritative version of the subject prefix even
while parsing command line options, and sprefix variable was used as
a temporary area to futz with it.  Now, the parsing code has been
refactored to build the subject prefix into the sprefix variable and
assigns its value at the end to rev.subject_prefix, which makes the
flow easier to grasp.

Signed-off-by: Drew DeVault &lt;sir@cmpwn.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
