threads / patch / 64744

patch, 6 partsdoc: patch-id: six small improvements

Subject: [PATCH 0/6] doc: patch-id: six small improvements

## tl;dr

20 messages between Jan 8, 2026 and Jan 9, 2026. Diffs are folded; open one to read it.

replies: 19people: 4as markdown or json

kristofferhaugsbakk@fastmail.com· Jan 8, 2026, 06:28 UTC · lore
From: Kristoffer Haugsbakk <code@khaugsbakk.name>
Topic name: kh/doc-patch-id-3

Topic summary: Improvements to git-patch-id(1). Fix git-diff-tree(1) mention, Fix '--verbatim' documentation, and four other small improvements.

This is the third patch series for git-patch-id(1). This one only has small improvements.

• Patch series 1:
  • Topic: kh/doc-patch-id-markup-fix
  • https://lore.kernel.org/git/v2-e5ad12cc3b3.1759178715.git.code@khaugsbakk.name/
• Patch series 2:
  • Topic: kh/doc-patch-id-1
  • https://lore.kernel.org/git/v2-38645ea253c.1760369708.git.code@khaugsbakk.name/
Kristoffer Haugsbakk (6):
  doc: patch-id: don’t use semicolon between bullet points
  doc: patch-id: capitalize Git version
  patch-id: use “patch ID” throughout
  doc: patch-id: use definite article for the result
  doc: patch-id: spell out the git-diff-tree(1) form
  doc: patch-id: --verbatim locks in --stable
 Documentation/git-patch-id.adoc | 20 ++++++++++----------
 builtin/patch-id.c              |  4 ++--
 2 files changed, 12 insertions(+), 12 deletions(-)
base-commit: 9a2fb147f2c61d0cab52c883e7e26f5b7948e3ed
-- 
2.52.0.421.gc32ead4fc78
kristofferhaugsbakk@fastmail.com· Jan 8, 2026, 06:28 UTC · re: kristofferhaugsbakk@fastmail.com · lore

[PATCH 1/6] doc: patch-id: don’t use semicolon between bullet points

From: Kristoffer Haugsbakk <code@khaugsbakk.name>

These bullet points are full-fledged paragraphs with sentences. It’s best to restrict semicolon-termination to the case when the bullet list amounts to a list of items.[1]

† 1: Like “List: ... • first; ... • second; and ... • third.”
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
 Documentation/git-patch-id.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to Documentation/git-patch-id.adoc +1 −1
diff --git a/Documentation/git-patch-id.adoc b/Documentation/git-patch-id.adoc
index 92a1af36a27..bac37db09d4 100644
--- a/Documentation/git-patch-id.adoc
+++ b/Documentation/git-patch-id.adoc
@@ -45,7 +45,7 @@ This is the default if `patchid.verbatim` is `true`.
   with two different settings for `-O<orderfile>` result in the same
   patch ID signature, thereby allowing the computed result to be used
   as a key to index some meta-information about the change between
-  the two trees;
+  the two trees.
 
 - Result is different from the value produced by git 1.9 and older
   or produced when an "unstable" hash (see `--unstable` below) is
-- 
2.52.0.421.gc32ead4fc78
kristofferhaugsbakk@fastmail.com· Jan 8, 2026, 06:28 UTC · re: kristofferhaugsbakk@fastmail.com · lore

[PATCH 2/6] doc: patch-id: capitalize Git version

From: Kristoffer Haugsbakk <code@khaugsbakk.name>
Git versions are always capitalized.
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
 Documentation/git-patch-id.adoc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Show changes to Documentation/git-patch-id.adoc +3 −3
diff --git a/Documentation/git-patch-id.adoc b/Documentation/git-patch-id.adoc
index bac37db09d4..82992e35fc1 100644
--- a/Documentation/git-patch-id.adoc
+++ b/Documentation/git-patch-id.adoc
@@ -47,7 +47,7 @@ This is the default if `patchid.verbatim` is `true`.
   as a key to index some meta-information about the change between
   the two trees.
 
-- Result is different from the value produced by git 1.9 and older
+- Result is different from the value produced by Git 1.9 and older
   or produced when an "unstable" hash (see `--unstable` below) is
   configured - even when used on a diff output taken without any use
   of `-O<orderfile>`, thereby making existing databases storing such
@@ -61,8 +61,8 @@ This is the default if `patchid.stable` is set to `true`.
 `--unstable`::
 	Use an "unstable" hash as the patch ID. With this option,
 	the result produced is compatible with the patch-id value produced
-	by git 1.9 and older and whitespace is ignored.  Users with pre-existing
-	databases storing patch-ids produced by git 1.9 and older (who do not deal
+	by Git 1.9 and older and whitespace is ignored.  Users with pre-existing
+	databases storing patch-ids produced by Git 1.9 and older (who do not deal
 	with reordered patches) may want to use this option.
 +
 This is the default.
-- 
2.52.0.421.gc32ead4fc78
kristofferhaugsbakk@fastmail.com· Jan 8, 2026, 06:28 UTC · re: kristofferhaugsbakk@fastmail.com · lore

[PATCH 3/6] patch-id: use “patch ID” throughout

From: Kristoffer Haugsbakk <code@khaugsbakk.name>

The “Description” section decided to introduce and use the term “patch ID” for the ID value itself. Let’s use the same term on the options as well.

Also make to sure to use bare “ID” instead of “id”.
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
 Documentation/git-patch-id.adoc | 10 +++++-----
 builtin/patch-id.c              |  4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)
Show changes to 2 files +7 −7

Documentation/git-patch-id.adoc, builtin/patch-id.c

diff --git a/Documentation/git-patch-id.adoc b/Documentation/git-patch-id.adoc
index 82992e35fc1..9999f164b58 100644
--- a/Documentation/git-patch-id.adoc
+++ b/Documentation/git-patch-id.adoc
@@ -31,7 +31,7 @@ OPTIONS
 -------
 
 `--verbatim`::
-	Calculate the patch-id of the input as it is given, do not strip
+	Calculate the patch ID of the input as it is given, do not strip
 	any whitespace.
 +
 This is the default if `patchid.verbatim` is `true`.
@@ -51,18 +51,18 @@ This is the default if `patchid.verbatim` is `true`.
   or produced when an "unstable" hash (see `--unstable` below) is
   configured - even when used on a diff output taken without any use
   of `-O<orderfile>`, thereby making existing databases storing such
-  "unstable" or historical patch-ids unusable.
+  "unstable" or historical patch IDs unusable.
 
-- All whitespace within the patch is ignored and does not affect the id.
+- All whitespace within the patch is ignored and does not affect the ID.
 --
 +
 This is the default if `patchid.stable` is set to `true`.
 
 `--unstable`::
 	Use an "unstable" hash as the patch ID. With this option,
-	the result produced is compatible with the patch-id value produced
+	the result produced is compatible with the patch ID value produced
 	by Git 1.9 and older and whitespace is ignored.  Users with pre-existing
-	databases storing patch-ids produced by Git 1.9 and older (who do not deal
+	databases storing patch IDs produced by Git 1.9 and older (who do not deal
 	with reordered patches) may want to use this option.
 +
 This is the default.
diff --git a/builtin/patch-id.c b/builtin/patch-id.c
index d26e9d0c1ea..2781598ede6 100644
--- a/builtin/patch-id.c
+++ b/builtin/patch-id.c
@@ -228,9 +228,9 @@ int cmd_patch_id(int argc,
 	int opts = 0;
 	struct option builtin_patch_id_options[] = {
 		OPT_CMDMODE(0, "unstable", &opts,
-		    N_("use the unstable patch-id algorithm"), 1),
+		    N_("use the unstable patch ID algorithm"), 1),
 		OPT_CMDMODE(0, "stable", &opts,
-		    N_("use the stable patch-id algorithm"), 2),
+		    N_("use the stable patch ID algorithm"), 2),
 		OPT_CMDMODE(0, "verbatim", &opts,
 			N_("don't strip whitespace from the patch"), 3),
 		OPT_END()
-- 
2.52.0.421.gc32ead4fc78
kristofferhaugsbakk@fastmail.com· Jan 8, 2026, 06:28 UTC · re: kristofferhaugsbakk@fastmail.com · lore

[PATCH 4/6] doc: patch-id: use definite article for the result

From: Kristoffer Haugsbakk <code@khaugsbakk.name>
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
 Documentation/git-patch-id.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to Documentation/git-patch-id.adoc +1 −1
diff --git a/Documentation/git-patch-id.adoc b/Documentation/git-patch-id.adoc
index 9999f164b58..abd02fccdc0 100644
--- a/Documentation/git-patch-id.adoc
+++ b/Documentation/git-patch-id.adoc
@@ -47,7 +47,7 @@ This is the default if `patchid.verbatim` is `true`.
   as a key to index some meta-information about the change between
   the two trees.
 
-- Result is different from the value produced by Git 1.9 and older
+- The result is different from the value produced by Git 1.9 and older
   or produced when an "unstable" hash (see `--unstable` below) is
   configured - even when used on a diff output taken without any use
   of `-O<orderfile>`, thereby making existing databases storing such
-- 
2.52.0.421.gc32ead4fc78
kristofferhaugsbakk@fastmail.com· Jan 8, 2026, 06:28 UTC · re: kristofferhaugsbakk@fastmail.com · lore

[PATCH 5/6] doc: patch-id: spell out the git-diff-tree(1) form

From: Kristoffer Haugsbakk <code@khaugsbakk.name>
You specifically need `--patch` since the default output is a raw diff.
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
 Documentation/git-patch-id.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to Documentation/git-patch-id.adoc +1 −1
diff --git a/Documentation/git-patch-id.adoc b/Documentation/git-patch-id.adoc
index abd02fccdc0..61498def317 100644
--- a/Documentation/git-patch-id.adoc
+++ b/Documentation/git-patch-id.adoc
@@ -21,7 +21,7 @@ the same time also reasonably unique, i.e., two patches that have the same
 
 The main usecase for this command is to look for likely duplicate commits.
 
-When dealing with `git diff-tree` output, it takes advantage of
+When dealing with `git diff-tree --patch` output, it takes advantage of
 the fact that the patch is prefixed with the object name of the
 commit, and outputs two 40-byte hexadecimal strings.  The first
 string is the patch ID, and the second string is the commit ID.
-- 
2.52.0.421.gc32ead4fc78
kristofferhaugsbakk@fastmail.com· Jan 8, 2026, 06:28 UTC · re: kristofferhaugsbakk@fastmail.com · lore

[PATCH 6/6] doc: patch-id: --verbatim locks in --stable

From: Kristoffer Haugsbakk <code@khaugsbakk.name>

The default `--unstable` is a legacy format that predates `--stable`. That’s why 2871f4d4 (builtin: patch-id: add --verbatim as a command mode, 2022-10-24) made `--verbatim` lock in[1] `--stable`:

    Users of --unstable mainly care about compatibility with old git
    versions, which unstripping the whitespace would break. Thus there
    isn't a usecase for the combination of --verbatim and --unstable,
    and we don't expose this so as to not add maintainence burden.
† 1: imply `--stable`, disallow `--unstable
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
 Documentation/git-patch-id.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to Documentation/git-patch-id.adoc +1 −1
diff --git a/Documentation/git-patch-id.adoc b/Documentation/git-patch-id.adoc
index 61498def317..013e1a61906 100644
--- a/Documentation/git-patch-id.adoc
+++ b/Documentation/git-patch-id.adoc
@@ -32,7 +32,7 @@ OPTIONS
 
 `--verbatim`::
 	Calculate the patch ID of the input as it is given, do not strip
-	any whitespace.
+	any whitespace. Implies `--stable` and forbids `--unstable`.
 +
 This is the default if `patchid.verbatim` is `true`.
 
-- 
2.52.0.421.gc32ead4fc78
Pushkar Singh· Jan 8, 2026, 18:15 UTC · re: kristofferhaugsbakk@fastmail.com · lore

Re: [PATCH 6/6] doc: patch-id: --verbatim locks in --stable

Hi Kristoffer,
I read through the entire series and all six changes look correct to me.

Each patch is small and focused, and together they improve the clarity, consistency, and accuracy of the git-patch-id documentation without changing meaning. In particular, spelling out the `git diff-tree --patch` form and documenting the `--verbatim` / `--stable` relationship help align the docs more closely with the actual behavior and existing code.

I didn’t notice any issues with the changes.

Thanks for working on this, Pushkar

On Thu, Jan 8, 2026 at 12:02 PM <kristofferhaugsbakk@fastmail.com> wrote:
Show 36 quoted lines
>
> From: Kristoffer Haugsbakk <code@khaugsbakk.name>
>
> The default `--unstable` is a legacy format that predates `--stable`.
> That’s why 2871f4d4 (builtin: patch-id: add --verbatim as a command mode,
> 2022-10-24) made `--verbatim` lock in[1] `--stable`:
>
>     Users of --unstable mainly care about compatibility with old git
>     versions, which unstripping the whitespace would break. Thus there
>     isn't a usecase for the combination of --verbatim and --unstable,
>     and we don't expose this so as to not add maintainence burden.
>
> † 1: imply `--stable`, disallow `--unstable
>
> Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
> ---
>  Documentation/git-patch-id.adoc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/git-patch-id.adoc b/Documentation/git-patch-id.adoc
> index 61498def317..013e1a61906 100644
> --- a/Documentation/git-patch-id.adoc
> +++ b/Documentation/git-patch-id.adoc
> @@ -32,7 +32,7 @@ OPTIONS
>
>  `--verbatim`::
>         Calculate the patch ID of the input as it is given, do not strip
> -       any whitespace.
> +       any whitespace. Implies `--stable` and forbids `--unstable`.
>  +
>  This is the default if `patchid.verbatim` is `true`.
>
> --
> 2.52.0.421.gc32ead4fc78
>
>
Kristoffer Haugsbakk· Jan 8, 2026, 18:18 UTC · re: Pushkar Singh · lore

Re: [PATCH 6/6] doc: patch-id: --verbatim locks in --stable

On Thu, Jan 8, 2026, at 19:15, Pushkar Singh wrote:
Show 12 quoted lines
> I read through the entire series and all six changes look correct to me.
>
> Each patch is small and focused, and together they improve the clarity,
> consistency, and accuracy of the git-patch-id documentation without
> changing meaning. In particular, spelling out the `git diff-tree --patch`
> form and documenting the `--verbatim` / `--stable` relationship help align
> the docs more closely with the actual behavior and existing code.
>
> I didn’t notice any issues with the changes.
>
> Thanks for working on this,
> Pushkar
Hi Pushkar. Thanks for reviewing!
Kristoffer Haugsbakk· Jan 8, 2026, 18:26 UTC · re: kristofferhaugsbakk@fastmail.com · lore

Re: [PATCH 6/6] doc: patch-id: --verbatim locks in --stable

On Thu, Jan 8, 2026, at 07:28, kristofferhaugsbakk@fastmail.com wrote:
Show 12 quoted lines
> From: Kristoffer Haugsbakk <code@khaugsbakk.name>
>
> The default `--unstable` is a legacy format that predates `--stable`.
> That’s why 2871f4d4 (builtin: patch-id: add --verbatim as a command mode,
> 2022-10-24) made `--verbatim` lock in[1] `--stable`:
>
>     Users of --unstable mainly care about compatibility with old git
>     versions, which unstripping the whitespace would break. Thus there
>     isn't a usecase for the combination of --verbatim and --unstable,
>     and we don't expose this so as to not add maintainence burden.
>
> † 1: imply `--stable`, disallow `--unstable
s/`--unstable/`--unstable`/
>
> Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
> ---
>[snip]
Patrick Steinhardt· Jan 9, 2026, 11:38 UTC · re: kristofferhaugsbakk@fastmail.com · lore

Re: [PATCH 0/6] doc: patch-id: six small improvements

On Thu, Jan 08, 2026 at 07:28:14AM +0100, kristofferhaugsbakk@fastmail.com wrote:
Show 10 quoted lines
> From: Kristoffer Haugsbakk <code@khaugsbakk.name>
> 
> Topic name: kh/doc-patch-id-3
> 
> Topic summary: Improvements to git-patch-id(1).  Fix git-diff-tree(1)
> mention, Fix '--verbatim' documentation, and four other small
> improvements.
> 
> This is the third patch series for git-patch-id(1). This one only has
> small improvements.

Except for the small nit that you yourself noticed on the last patch all of these patches look like obvious improvements to me. Thanks!

Patrick
Kristoffer Haugsbakk· Jan 9, 2026, 11:45 UTC · re: Patrick Steinhardt · lore

Re: [PATCH 0/6] doc: patch-id: six small improvements

On Fri, Jan 9, 2026, at 12:38, Patrick Steinhardt wrote:
Show 5 quoted lines
> On Thu, Jan 08, 2026 at 07:28:14AM +0100,
> kristofferhaugsbakk@fastmail.com wrote:
>>[snip]
> Except for the small nit that you yourself noticed on the last patch all
> of these patches look like obvious improvements to me. Thanks!

Thanks for taking a look! I should get around to making a second version with that nit removed today. :)

kristofferhaugsbakk@fastmail.com· Jan 9, 2026, 14:25 UTC · re: kristofferhaugsbakk@fastmail.com · lore

[PATCH v2 0/6] doc: patch-id: six small improvements

From: Kristoffer Haugsbakk <code@khaugsbakk.name>
Topic name: kh/doc-patch-id-3

Topic summary: Improvements to git-patch-id(1). Fix git-diff-tree(1) mention, Fix '--verbatim' documentation, and four other small improvements.

This is the third patch series for git-patch-id(1). This one only has small improvements.

• Patch series 1:
  • Topic: kh/doc-patch-id-markup-fix
  • https://lore.kernel.org/git/v2-e5ad12cc3b3.1759178715.git.code@khaugsbakk.name/
• Patch series 2:
  • Topic: kh/doc-patch-id-1
  • https://lore.kernel.org/git/v2-38645ea253c.1760369708.git.code@khaugsbakk.name/
§ Changtes in v2
Fix markup in commit message.
Kristoffer Haugsbakk (6):
  doc: patch-id: don’t use semicolon between bullet points
  doc: patch-id: capitalize Git version
  patch-id: use “patch ID” throughout
  doc: patch-id: use definite article for the result
  doc: patch-id: spell out the git-diff-tree(1) form
  doc: patch-id: --verbatim locks in --stable
 Documentation/git-patch-id.adoc | 20 ++++++++++----------
 builtin/patch-id.c              |  4 ++--
 2 files changed, 12 insertions(+), 12 deletions(-)
Interdiff against v1:
Range-diff against v1:
1:  b3883b32d26 = 1:  b3883b32d26 doc: patch-id: don’t use semicolon between bullet points
2:  d96ab8edb3f = 2:  d96ab8edb3f doc: patch-id: capitalize Git version
3:  f7f249d79ce = 3:  f7f249d79ce patch-id: use “patch ID” throughout
4:  28c11153e6a = 4:  28c11153e6a doc: patch-id: use definite article for the result
5:  463c6c60ec6 = 5:  463c6c60ec6 doc: patch-id: spell out the git-diff-tree(1) form
6:  03cc19de8da ! 6:  0b5c10f143e doc: patch-id: --verbatim locks in --stable
    @@ Commit message
             isn't a usecase for the combination of --verbatim and --unstable,
             and we don't expose this so as to not add maintainence burden.
     
    -    † 1: imply `--stable`, disallow `--unstable
    +    † 1: imply `--stable`, disallow `--unstable`
     
         Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
     
    +
    + ## Notes (series) ##
    +    v2:
    +    Fix “markup” in commit message: `--unstable`.
    +
      ## Documentation/git-patch-id.adoc ##
     @@ Documentation/git-patch-id.adoc: OPTIONS
      
base-commit: 9a2fb147f2c61d0cab52c883e7e26f5b7948e3ed
-- 
2.52.0.421.gc32ead4fc78
kristofferhaugsbakk@fastmail.com· Jan 9, 2026, 14:25 UTC · re: kristofferhaugsbakk@fastmail.com · lore

[PATCH v2 1/6] doc: patch-id: don’t use semicolon between bullet points

From: Kristoffer Haugsbakk <code@khaugsbakk.name>

These bullet points are full-fledged paragraphs with sentences. It’s best to restrict semicolon-termination to the case when the bullet list amounts to a list of items.[1]

† 1: Like “List: ... • first; ... • second; and ... • third.”
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
 Documentation/git-patch-id.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to Documentation/git-patch-id.adoc +1 −1
diff --git a/Documentation/git-patch-id.adoc b/Documentation/git-patch-id.adoc
index 92a1af36a27..bac37db09d4 100644
--- a/Documentation/git-patch-id.adoc
+++ b/Documentation/git-patch-id.adoc
@@ -45,7 +45,7 @@ This is the default if `patchid.verbatim` is `true`.
   with two different settings for `-O<orderfile>` result in the same
   patch ID signature, thereby allowing the computed result to be used
   as a key to index some meta-information about the change between
-  the two trees;
+  the two trees.
 
 - Result is different from the value produced by git 1.9 and older
   or produced when an "unstable" hash (see `--unstable` below) is
-- 
2.52.0.421.gc32ead4fc78
kristofferhaugsbakk@fastmail.com· Jan 9, 2026, 14:25 UTC · re: kristofferhaugsbakk@fastmail.com · lore

[PATCH v2 2/6] doc: patch-id: capitalize Git version

From: Kristoffer Haugsbakk <code@khaugsbakk.name>
Git versions are always capitalized.
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
 Documentation/git-patch-id.adoc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Show changes to Documentation/git-patch-id.adoc +3 −3
diff --git a/Documentation/git-patch-id.adoc b/Documentation/git-patch-id.adoc
index bac37db09d4..82992e35fc1 100644
--- a/Documentation/git-patch-id.adoc
+++ b/Documentation/git-patch-id.adoc
@@ -47,7 +47,7 @@ This is the default if `patchid.verbatim` is `true`.
   as a key to index some meta-information about the change between
   the two trees.
 
-- Result is different from the value produced by git 1.9 and older
+- Result is different from the value produced by Git 1.9 and older
   or produced when an "unstable" hash (see `--unstable` below) is
   configured - even when used on a diff output taken without any use
   of `-O<orderfile>`, thereby making existing databases storing such
@@ -61,8 +61,8 @@ This is the default if `patchid.stable` is set to `true`.
 `--unstable`::
 	Use an "unstable" hash as the patch ID. With this option,
 	the result produced is compatible with the patch-id value produced
-	by git 1.9 and older and whitespace is ignored.  Users with pre-existing
-	databases storing patch-ids produced by git 1.9 and older (who do not deal
+	by Git 1.9 and older and whitespace is ignored.  Users with pre-existing
+	databases storing patch-ids produced by Git 1.9 and older (who do not deal
 	with reordered patches) may want to use this option.
 +
 This is the default.
-- 
2.52.0.421.gc32ead4fc78
kristofferhaugsbakk@fastmail.com· Jan 9, 2026, 14:25 UTC · re: kristofferhaugsbakk@fastmail.com · lore

[PATCH v2 3/6] patch-id: use “patch ID” throughout

From: Kristoffer Haugsbakk <code@khaugsbakk.name>

The “Description” section decided to introduce and use the term “patch ID” for the ID value itself. Let’s use the same term on the options as well.

Also make to sure to use bare “ID” instead of “id”.
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
 Documentation/git-patch-id.adoc | 10 +++++-----
 builtin/patch-id.c              |  4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)
Show changes to 2 files +7 −7

Documentation/git-patch-id.adoc, builtin/patch-id.c

diff --git a/Documentation/git-patch-id.adoc b/Documentation/git-patch-id.adoc
index 82992e35fc1..9999f164b58 100644
--- a/Documentation/git-patch-id.adoc
+++ b/Documentation/git-patch-id.adoc
@@ -31,7 +31,7 @@ OPTIONS
 -------
 
 `--verbatim`::
-	Calculate the patch-id of the input as it is given, do not strip
+	Calculate the patch ID of the input as it is given, do not strip
 	any whitespace.
 +
 This is the default if `patchid.verbatim` is `true`.
@@ -51,18 +51,18 @@ This is the default if `patchid.verbatim` is `true`.
   or produced when an "unstable" hash (see `--unstable` below) is
   configured - even when used on a diff output taken without any use
   of `-O<orderfile>`, thereby making existing databases storing such
-  "unstable" or historical patch-ids unusable.
+  "unstable" or historical patch IDs unusable.
 
-- All whitespace within the patch is ignored and does not affect the id.
+- All whitespace within the patch is ignored and does not affect the ID.
 --
 +
 This is the default if `patchid.stable` is set to `true`.
 
 `--unstable`::
 	Use an "unstable" hash as the patch ID. With this option,
-	the result produced is compatible with the patch-id value produced
+	the result produced is compatible with the patch ID value produced
 	by Git 1.9 and older and whitespace is ignored.  Users with pre-existing
-	databases storing patch-ids produced by Git 1.9 and older (who do not deal
+	databases storing patch IDs produced by Git 1.9 and older (who do not deal
 	with reordered patches) may want to use this option.
 +
 This is the default.
diff --git a/builtin/patch-id.c b/builtin/patch-id.c
index d26e9d0c1ea..2781598ede6 100644
--- a/builtin/patch-id.c
+++ b/builtin/patch-id.c
@@ -228,9 +228,9 @@ int cmd_patch_id(int argc,
 	int opts = 0;
 	struct option builtin_patch_id_options[] = {
 		OPT_CMDMODE(0, "unstable", &opts,
-		    N_("use the unstable patch-id algorithm"), 1),
+		    N_("use the unstable patch ID algorithm"), 1),
 		OPT_CMDMODE(0, "stable", &opts,
-		    N_("use the stable patch-id algorithm"), 2),
+		    N_("use the stable patch ID algorithm"), 2),
 		OPT_CMDMODE(0, "verbatim", &opts,
 			N_("don't strip whitespace from the patch"), 3),
 		OPT_END()
-- 
2.52.0.421.gc32ead4fc78
kristofferhaugsbakk@fastmail.com· Jan 9, 2026, 14:26 UTC · re: kristofferhaugsbakk@fastmail.com · lore

[PATCH v2 4/6] doc: patch-id: use definite article for the result

From: Kristoffer Haugsbakk <code@khaugsbakk.name>
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
 Documentation/git-patch-id.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to Documentation/git-patch-id.adoc +1 −1
diff --git a/Documentation/git-patch-id.adoc b/Documentation/git-patch-id.adoc
index 9999f164b58..abd02fccdc0 100644
--- a/Documentation/git-patch-id.adoc
+++ b/Documentation/git-patch-id.adoc
@@ -47,7 +47,7 @@ This is the default if `patchid.verbatim` is `true`.
   as a key to index some meta-information about the change between
   the two trees.
 
-- Result is different from the value produced by Git 1.9 and older
+- The result is different from the value produced by Git 1.9 and older
   or produced when an "unstable" hash (see `--unstable` below) is
   configured - even when used on a diff output taken without any use
   of `-O<orderfile>`, thereby making existing databases storing such
-- 
2.52.0.421.gc32ead4fc78
kristofferhaugsbakk@fastmail.com· Jan 9, 2026, 14:26 UTC · re: kristofferhaugsbakk@fastmail.com · lore

[PATCH v2 5/6] doc: patch-id: spell out the git-diff-tree(1) form

From: Kristoffer Haugsbakk <code@khaugsbakk.name>
You specifically need `--patch` since the default output is a raw diff.
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
 Documentation/git-patch-id.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to Documentation/git-patch-id.adoc +1 −1
diff --git a/Documentation/git-patch-id.adoc b/Documentation/git-patch-id.adoc
index abd02fccdc0..61498def317 100644
--- a/Documentation/git-patch-id.adoc
+++ b/Documentation/git-patch-id.adoc
@@ -21,7 +21,7 @@ the same time also reasonably unique, i.e., two patches that have the same
 
 The main usecase for this command is to look for likely duplicate commits.
 
-When dealing with `git diff-tree` output, it takes advantage of
+When dealing with `git diff-tree --patch` output, it takes advantage of
 the fact that the patch is prefixed with the object name of the
 commit, and outputs two 40-byte hexadecimal strings.  The first
 string is the patch ID, and the second string is the commit ID.
-- 
2.52.0.421.gc32ead4fc78
kristofferhaugsbakk@fastmail.com· Jan 9, 2026, 14:26 UTC · re: kristofferhaugsbakk@fastmail.com · lore

[PATCH v2 6/6] doc: patch-id: --verbatim locks in --stable

From: Kristoffer Haugsbakk <code@khaugsbakk.name>

The default `--unstable` is a legacy format that predates `--stable`. That’s why 2871f4d4 (builtin: patch-id: add --verbatim as a command mode, 2022-10-24) made `--verbatim` lock in[1] `--stable`:

    Users of --unstable mainly care about compatibility with old git
    versions, which unstripping the whitespace would break. Thus there
    isn't a usecase for the combination of --verbatim and --unstable,
    and we don't expose this so as to not add maintainence burden.
† 1: imply `--stable`, disallow `--unstable`
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
Notes (series):
    v2:
    Fix “markup” in commit message: `--unstable`.
 Documentation/git-patch-id.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to Documentation/git-patch-id.adoc +1 −1
diff --git a/Documentation/git-patch-id.adoc b/Documentation/git-patch-id.adoc
index 61498def317..013e1a61906 100644
--- a/Documentation/git-patch-id.adoc
+++ b/Documentation/git-patch-id.adoc
@@ -32,7 +32,7 @@ OPTIONS
 
 `--verbatim`::
 	Calculate the patch ID of the input as it is given, do not strip
-	any whitespace.
+	any whitespace. Implies `--stable` and forbids `--unstable`.
 +
 This is the default if `patchid.verbatim` is `true`.
 
-- 
2.52.0.421.gc32ead4fc78
Patrick Steinhardt· Jan 9, 2026, 14:55 UTC · re: kristofferhaugsbakk@fastmail.com · lore

Re: [PATCH v2 0/6] doc: patch-id: six small improvements

On Fri, Jan 09, 2026 at 03:25:56PM +0100, kristofferhaugsbakk@fastmail.com wrote:
Show 21 quoted lines
> From: Kristoffer Haugsbakk <code@khaugsbakk.name>
> 
> Topic name: kh/doc-patch-id-3
> 
> Topic summary: Improvements to git-patch-id(1).  Fix git-diff-tree(1)
> mention, Fix '--verbatim' documentation, and four other small
> improvements.
> 
> This is the third patch series for git-patch-id(1). This one only has
> small improvements.
> 
> • Patch series 1:
>   • Topic: kh/doc-patch-id-markup-fix
>   • https://lore.kernel.org/git/v2-e5ad12cc3b3.1759178715.git.code@khaugsbakk.name/
> • Patch series 2:
>   • Topic: kh/doc-patch-id-1
>   • https://lore.kernel.org/git/v2-38645ea253c.1760369708.git.code@khaugsbakk.name/
> 
> § Changtes in v2
> 
> Fix markup in commit message.
This version looks good to me based on the range-diff, thanks!
Patrick

← back to recent threads