git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] doc: patch-id: six small improvements
@ 2026-01-08  6:28 kristofferhaugsbakk
  2026-01-08  6:28 ` [PATCH 1/6] doc: patch-id: don’t use semicolon between bullet points kristofferhaugsbakk
                   ` (7 more replies)
  0 siblings, 8 replies; 20+ messages in thread
From: kristofferhaugsbakk @ 2026-01-08  6:28 UTC (permalink / raw)
  To: git; +Cc: Kristoffer Haugsbakk

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


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 1/6] doc: patch-id: don’t use semicolon between bullet points
  2026-01-08  6:28 [PATCH 0/6] doc: patch-id: six small improvements kristofferhaugsbakk
@ 2026-01-08  6:28 ` kristofferhaugsbakk
  2026-01-08  6:28 ` [PATCH 2/6] doc: patch-id: capitalize Git version kristofferhaugsbakk
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 20+ messages in thread
From: kristofferhaugsbakk @ 2026-01-08  6:28 UTC (permalink / raw)
  To: git; +Cc: Kristoffer Haugsbakk

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(-)

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


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 2/6] doc: patch-id: capitalize Git version
  2026-01-08  6:28 [PATCH 0/6] doc: patch-id: six small improvements kristofferhaugsbakk
  2026-01-08  6:28 ` [PATCH 1/6] doc: patch-id: don’t use semicolon between bullet points kristofferhaugsbakk
@ 2026-01-08  6:28 ` kristofferhaugsbakk
  2026-01-08  6:28 ` [PATCH 3/6] patch-id: use “patch ID” throughout kristofferhaugsbakk
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 20+ messages in thread
From: kristofferhaugsbakk @ 2026-01-08  6:28 UTC (permalink / raw)
  To: git; +Cc: Kristoffer Haugsbakk

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(-)

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


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 3/6] patch-id: use “patch ID” throughout
  2026-01-08  6:28 [PATCH 0/6] doc: patch-id: six small improvements kristofferhaugsbakk
  2026-01-08  6:28 ` [PATCH 1/6] doc: patch-id: don’t use semicolon between bullet points kristofferhaugsbakk
  2026-01-08  6:28 ` [PATCH 2/6] doc: patch-id: capitalize Git version kristofferhaugsbakk
@ 2026-01-08  6:28 ` kristofferhaugsbakk
  2026-01-08  6:28 ` [PATCH 4/6] doc: patch-id: use definite article for the result kristofferhaugsbakk
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 20+ messages in thread
From: kristofferhaugsbakk @ 2026-01-08  6:28 UTC (permalink / raw)
  To: git; +Cc: Kristoffer Haugsbakk

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(-)

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


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 4/6] doc: patch-id: use definite article for the result
  2026-01-08  6:28 [PATCH 0/6] doc: patch-id: six small improvements kristofferhaugsbakk
                   ` (2 preceding siblings ...)
  2026-01-08  6:28 ` [PATCH 3/6] patch-id: use “patch ID” throughout kristofferhaugsbakk
@ 2026-01-08  6:28 ` kristofferhaugsbakk
  2026-01-08  6:28 ` [PATCH 5/6] doc: patch-id: spell out the git-diff-tree(1) form kristofferhaugsbakk
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 20+ messages in thread
From: kristofferhaugsbakk @ 2026-01-08  6:28 UTC (permalink / raw)
  To: git; +Cc: Kristoffer Haugsbakk

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(-)

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


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 5/6] doc: patch-id: spell out the git-diff-tree(1) form
  2026-01-08  6:28 [PATCH 0/6] doc: patch-id: six small improvements kristofferhaugsbakk
                   ` (3 preceding siblings ...)
  2026-01-08  6:28 ` [PATCH 4/6] doc: patch-id: use definite article for the result kristofferhaugsbakk
@ 2026-01-08  6:28 ` kristofferhaugsbakk
  2026-01-08  6:28 ` [PATCH 6/6] doc: patch-id: --verbatim locks in --stable kristofferhaugsbakk
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 20+ messages in thread
From: kristofferhaugsbakk @ 2026-01-08  6:28 UTC (permalink / raw)
  To: git; +Cc: Kristoffer Haugsbakk

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(-)

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


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 6/6] doc: patch-id: --verbatim locks in --stable
  2026-01-08  6:28 [PATCH 0/6] doc: patch-id: six small improvements kristofferhaugsbakk
                   ` (4 preceding siblings ...)
  2026-01-08  6:28 ` [PATCH 5/6] doc: patch-id: spell out the git-diff-tree(1) form kristofferhaugsbakk
@ 2026-01-08  6:28 ` kristofferhaugsbakk
  2026-01-08 18:15   ` Pushkar Singh
  2026-01-08 18:26   ` Kristoffer Haugsbakk
  2026-01-09 11:38 ` [PATCH 0/6] doc: patch-id: six small improvements Patrick Steinhardt
  2026-01-09 14:25 ` [PATCH v2 " kristofferhaugsbakk
  7 siblings, 2 replies; 20+ messages in thread
From: kristofferhaugsbakk @ 2026-01-08  6:28 UTC (permalink / raw)
  To: git; +Cc: Kristoffer Haugsbakk

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


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH 6/6] doc: patch-id: --verbatim locks in --stable
  2026-01-08  6:28 ` [PATCH 6/6] doc: patch-id: --verbatim locks in --stable kristofferhaugsbakk
@ 2026-01-08 18:15   ` Pushkar Singh
  2026-01-08 18:18     ` Kristoffer Haugsbakk
  2026-01-08 18:26   ` Kristoffer Haugsbakk
  1 sibling, 1 reply; 20+ messages in thread
From: Pushkar Singh @ 2026-01-08 18:15 UTC (permalink / raw)
  To: kristofferhaugsbakk; +Cc: git, Kristoffer Haugsbakk

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:
>
> 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
>
>

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 6/6] doc: patch-id: --verbatim locks in --stable
  2026-01-08 18:15   ` Pushkar Singh
@ 2026-01-08 18:18     ` Kristoffer Haugsbakk
  0 siblings, 0 replies; 20+ messages in thread
From: Kristoffer Haugsbakk @ 2026-01-08 18:18 UTC (permalink / raw)
  To: Pushkar Singh, Kristoffer Haugsbakk; +Cc: git

On Thu, Jan 8, 2026, at 19:15, Pushkar Singh wrote:
> 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!

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 6/6] doc: patch-id: --verbatim locks in --stable
  2026-01-08  6:28 ` [PATCH 6/6] doc: patch-id: --verbatim locks in --stable kristofferhaugsbakk
  2026-01-08 18:15   ` Pushkar Singh
@ 2026-01-08 18:26   ` Kristoffer Haugsbakk
  1 sibling, 0 replies; 20+ messages in thread
From: Kristoffer Haugsbakk @ 2026-01-08 18:26 UTC (permalink / raw)
  To: Kristoffer Haugsbakk, git

On Thu, Jan 8, 2026, at 07:28, kristofferhaugsbakk@fastmail.com wrote:
> 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]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 0/6] doc: patch-id: six small improvements
  2026-01-08  6:28 [PATCH 0/6] doc: patch-id: six small improvements kristofferhaugsbakk
                   ` (5 preceding siblings ...)
  2026-01-08  6:28 ` [PATCH 6/6] doc: patch-id: --verbatim locks in --stable kristofferhaugsbakk
@ 2026-01-09 11:38 ` Patrick Steinhardt
  2026-01-09 11:45   ` Kristoffer Haugsbakk
  2026-01-09 14:25 ` [PATCH v2 " kristofferhaugsbakk
  7 siblings, 1 reply; 20+ messages in thread
From: Patrick Steinhardt @ 2026-01-09 11:38 UTC (permalink / raw)
  To: kristofferhaugsbakk; +Cc: git, Kristoffer Haugsbakk

On Thu, Jan 08, 2026 at 07:28:14AM +0100, kristofferhaugsbakk@fastmail.com wrote:
> 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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 0/6] doc: patch-id: six small improvements
  2026-01-09 11:38 ` [PATCH 0/6] doc: patch-id: six small improvements Patrick Steinhardt
@ 2026-01-09 11:45   ` Kristoffer Haugsbakk
  0 siblings, 0 replies; 20+ messages in thread
From: Kristoffer Haugsbakk @ 2026-01-09 11:45 UTC (permalink / raw)
  To: Patrick Steinhardt; +Cc: git

On Fri, Jan 9, 2026, at 12:38, Patrick Steinhardt wrote:
> 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. :)

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH v2 0/6] doc: patch-id: six small improvements
  2026-01-08  6:28 [PATCH 0/6] doc: patch-id: six small improvements kristofferhaugsbakk
                   ` (6 preceding siblings ...)
  2026-01-09 11:38 ` [PATCH 0/6] doc: patch-id: six small improvements Patrick Steinhardt
@ 2026-01-09 14:25 ` kristofferhaugsbakk
  2026-01-09 14:25   ` [PATCH v2 1/6] doc: patch-id: don’t use semicolon between bullet points kristofferhaugsbakk
                     ` (6 more replies)
  7 siblings, 7 replies; 20+ messages in thread
From: kristofferhaugsbakk @ 2026-01-09 14:25 UTC (permalink / raw)
  To: git; +Cc: Kristoffer Haugsbakk, Pushkar Singh, Patrick Steinhardt

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


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH v2 1/6] doc: patch-id: don’t use semicolon between bullet points
  2026-01-09 14:25 ` [PATCH v2 " kristofferhaugsbakk
@ 2026-01-09 14:25   ` kristofferhaugsbakk
  2026-01-09 14:25   ` [PATCH v2 2/6] doc: patch-id: capitalize Git version kristofferhaugsbakk
                     ` (5 subsequent siblings)
  6 siblings, 0 replies; 20+ messages in thread
From: kristofferhaugsbakk @ 2026-01-09 14:25 UTC (permalink / raw)
  To: git; +Cc: Kristoffer Haugsbakk, Pushkar Singh, Patrick Steinhardt

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(-)

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


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH v2 2/6] doc: patch-id: capitalize Git version
  2026-01-09 14:25 ` [PATCH v2 " kristofferhaugsbakk
  2026-01-09 14:25   ` [PATCH v2 1/6] doc: patch-id: don’t use semicolon between bullet points kristofferhaugsbakk
@ 2026-01-09 14:25   ` kristofferhaugsbakk
  2026-01-09 14:25   ` [PATCH v2 3/6] patch-id: use “patch ID” throughout kristofferhaugsbakk
                     ` (4 subsequent siblings)
  6 siblings, 0 replies; 20+ messages in thread
From: kristofferhaugsbakk @ 2026-01-09 14:25 UTC (permalink / raw)
  To: git; +Cc: Kristoffer Haugsbakk, Pushkar Singh, Patrick Steinhardt

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(-)

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


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH v2 3/6] patch-id: use “patch ID” throughout
  2026-01-09 14:25 ` [PATCH v2 " kristofferhaugsbakk
  2026-01-09 14:25   ` [PATCH v2 1/6] doc: patch-id: don’t use semicolon between bullet points kristofferhaugsbakk
  2026-01-09 14:25   ` [PATCH v2 2/6] doc: patch-id: capitalize Git version kristofferhaugsbakk
@ 2026-01-09 14:25   ` kristofferhaugsbakk
  2026-01-09 14:26   ` [PATCH v2 4/6] doc: patch-id: use definite article for the result kristofferhaugsbakk
                     ` (3 subsequent siblings)
  6 siblings, 0 replies; 20+ messages in thread
From: kristofferhaugsbakk @ 2026-01-09 14:25 UTC (permalink / raw)
  To: git; +Cc: Kristoffer Haugsbakk, Pushkar Singh, Patrick Steinhardt

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(-)

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


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH v2 4/6] doc: patch-id: use definite article for the result
  2026-01-09 14:25 ` [PATCH v2 " kristofferhaugsbakk
                     ` (2 preceding siblings ...)
  2026-01-09 14:25   ` [PATCH v2 3/6] patch-id: use “patch ID” throughout kristofferhaugsbakk
@ 2026-01-09 14:26   ` kristofferhaugsbakk
  2026-01-09 14:26   ` [PATCH v2 5/6] doc: patch-id: spell out the git-diff-tree(1) form kristofferhaugsbakk
                     ` (2 subsequent siblings)
  6 siblings, 0 replies; 20+ messages in thread
From: kristofferhaugsbakk @ 2026-01-09 14:26 UTC (permalink / raw)
  To: git; +Cc: Kristoffer Haugsbakk, Pushkar Singh, Patrick Steinhardt

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(-)

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


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH v2 5/6] doc: patch-id: spell out the git-diff-tree(1) form
  2026-01-09 14:25 ` [PATCH v2 " kristofferhaugsbakk
                     ` (3 preceding siblings ...)
  2026-01-09 14:26   ` [PATCH v2 4/6] doc: patch-id: use definite article for the result kristofferhaugsbakk
@ 2026-01-09 14:26   ` kristofferhaugsbakk
  2026-01-09 14:26   ` [PATCH v2 6/6] doc: patch-id: --verbatim locks in --stable kristofferhaugsbakk
  2026-01-09 14:55   ` [PATCH v2 0/6] doc: patch-id: six small improvements Patrick Steinhardt
  6 siblings, 0 replies; 20+ messages in thread
From: kristofferhaugsbakk @ 2026-01-09 14:26 UTC (permalink / raw)
  To: git; +Cc: Kristoffer Haugsbakk, Pushkar Singh, Patrick Steinhardt

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(-)

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


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH v2 6/6] doc: patch-id: --verbatim locks in --stable
  2026-01-09 14:25 ` [PATCH v2 " kristofferhaugsbakk
                     ` (4 preceding siblings ...)
  2026-01-09 14:26   ` [PATCH v2 5/6] doc: patch-id: spell out the git-diff-tree(1) form kristofferhaugsbakk
@ 2026-01-09 14:26   ` kristofferhaugsbakk
  2026-01-09 14:55   ` [PATCH v2 0/6] doc: patch-id: six small improvements Patrick Steinhardt
  6 siblings, 0 replies; 20+ messages in thread
From: kristofferhaugsbakk @ 2026-01-09 14:26 UTC (permalink / raw)
  To: git; +Cc: Kristoffer Haugsbakk, Pushkar Singh, Patrick Steinhardt

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(-)

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


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 0/6] doc: patch-id: six small improvements
  2026-01-09 14:25 ` [PATCH v2 " kristofferhaugsbakk
                     ` (5 preceding siblings ...)
  2026-01-09 14:26   ` [PATCH v2 6/6] doc: patch-id: --verbatim locks in --stable kristofferhaugsbakk
@ 2026-01-09 14:55   ` Patrick Steinhardt
  6 siblings, 0 replies; 20+ messages in thread
From: Patrick Steinhardt @ 2026-01-09 14:55 UTC (permalink / raw)
  To: kristofferhaugsbakk; +Cc: git, Kristoffer Haugsbakk, Pushkar Singh

On Fri, Jan 09, 2026 at 03:25:56PM +0100, kristofferhaugsbakk@fastmail.com wrote:
> 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

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2026-01-09 14:55 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-08  6:28 [PATCH 0/6] doc: patch-id: six small improvements kristofferhaugsbakk
2026-01-08  6:28 ` [PATCH 1/6] doc: patch-id: don’t use semicolon between bullet points kristofferhaugsbakk
2026-01-08  6:28 ` [PATCH 2/6] doc: patch-id: capitalize Git version kristofferhaugsbakk
2026-01-08  6:28 ` [PATCH 3/6] patch-id: use “patch ID” throughout kristofferhaugsbakk
2026-01-08  6:28 ` [PATCH 4/6] doc: patch-id: use definite article for the result kristofferhaugsbakk
2026-01-08  6:28 ` [PATCH 5/6] doc: patch-id: spell out the git-diff-tree(1) form kristofferhaugsbakk
2026-01-08  6:28 ` [PATCH 6/6] doc: patch-id: --verbatim locks in --stable kristofferhaugsbakk
2026-01-08 18:15   ` Pushkar Singh
2026-01-08 18:18     ` Kristoffer Haugsbakk
2026-01-08 18:26   ` Kristoffer Haugsbakk
2026-01-09 11:38 ` [PATCH 0/6] doc: patch-id: six small improvements Patrick Steinhardt
2026-01-09 11:45   ` Kristoffer Haugsbakk
2026-01-09 14:25 ` [PATCH v2 " kristofferhaugsbakk
2026-01-09 14:25   ` [PATCH v2 1/6] doc: patch-id: don’t use semicolon between bullet points kristofferhaugsbakk
2026-01-09 14:25   ` [PATCH v2 2/6] doc: patch-id: capitalize Git version kristofferhaugsbakk
2026-01-09 14:25   ` [PATCH v2 3/6] patch-id: use “patch ID” throughout kristofferhaugsbakk
2026-01-09 14:26   ` [PATCH v2 4/6] doc: patch-id: use definite article for the result kristofferhaugsbakk
2026-01-09 14:26   ` [PATCH v2 5/6] doc: patch-id: spell out the git-diff-tree(1) form kristofferhaugsbakk
2026-01-09 14:26   ` [PATCH v2 6/6] doc: patch-id: --verbatim locks in --stable kristofferhaugsbakk
2026-01-09 14:55   ` [PATCH v2 0/6] doc: patch-id: six small improvements Patrick Steinhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).