# [PATCH] doc: commit: link to git-status(1) on all format options

3 messages from 2025-11-14 to 2025-11-18. Participants: kristofferhaugsbakk@fastmail.com, Junio C Hamano, Jeff King.
Thread: https://gitlist.dev/t/64479

## kristofferhaugsbakk@fastmail.com, 2025-11-14 14:04

Subject: [PATCH] doc: commit: link to git-status(1) on all format options
Message-ID: <c4349a03724.1763129061.git.code@khaugsbakk.name>
URL: https://gitlist.dev/e/c4349a03724.1763129061.git.code%40khaugsbakk.name

```
From: Kristoffer Haugsbakk <code@khaugsbakk.name>

`--branch` and `--long` refer to git-status(1) options but they don’t tell us
what `short-format` and `long-format` are, respectively. And `--null`
mentions “status” but does not link to the command.

Refer to git-config(1) on `--branch` like `--short` does.

`long-format` is the git-status(1) output. So we can just say that
directly.

Replace “status” with a `linkgit` on `--null`.

Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---

Notes (series):
    § Cc
    
    Cc Peff based on:
    
    • f3f47a1e (status: add --long output format option, 2012-10-18) did not
      • Did not link to git-config(1)
    link to git-config(1) even though the previous
    • 7c9f7038 (commit: support alternate status formats, 2009-09-05)
      • This older commit did
    
    I was going to mention these when I was only changing `--long` but the
    scope expanded to the other two options.

 Documentation/git-commit.adoc | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/Documentation/git-commit.adoc b/Documentation/git-commit.adoc
index ae988a883b5..30121b3c861 100644
--- a/Documentation/git-commit.adoc
+++ b/Documentation/git-commit.adoc
@@ -144,24 +144,26 @@ See linkgit:git-rebase[1] for details.
 `--short`::
 	When doing a dry-run, give the output in the short-format. See
 	linkgit:git-status[1] for details. Implies `--dry-run`.
 
 `--branch`::
-	Show the branch and tracking info even in short-format.
+	Show the branch and tracking info even in short-format. See
+	linkgit:git-status[1] for details.
 
 `--porcelain`::
 	When doing a dry-run, give the output in a porcelain-ready
 	format. See linkgit:git-status[1] for details. Implies
 	`--dry-run`.
 
 `--long`::
-	When doing a dry-run, give the output in the long-format.
-	Implies `--dry-run`.
+	When doing a dry-run, give the output in the long-format. This
+	is the default output of linkgit:git-status[1]. Implies
+	`--dry-run`.
 
 `-z`::
 `--null`::
-	When showing `short` or `porcelain` status output, print the
+	When showing `short` or `porcelain` linkgit:git-status[1] output, print the
 	filename verbatim and terminate the entries with _NUL_, instead of _LF_.
 	If no format is given, implies the `--porcelain` output format.
 	Without the `-z` option, filenames with "unusual" characters are
 	quoted as explained for the configuration variable `core.quotePath`
 	(see linkgit:git-config[1]).
-- 
2.52.0.rc1.43.gdcab96589da


```

## Junio C Hamano, 2025-11-17 01:07

Subject: Re: [PATCH] doc: commit: link to git-status(1) on all format options
Message-ID: <xmqqa50lbh6w.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqa50lbh6w.fsf%40gitster.g
In-Reply-To: <c4349a03724.1763129061.git.code@khaugsbakk.name>

```
kristofferhaugsbakk@fastmail.com writes:

> From: Kristoffer Haugsbakk <code@khaugsbakk.name>
>
> `--branch` and `--long` refer to git-status(1) options but they don’t tell us
> what `short-format` and `long-format` are, respectively. And `--null`
> mentions “status” but does not link to the command.
>
> Refer to git-config(1) on `--branch` like `--short` does.
>
> `long-format` is the git-status(1) output. So we can just say that
> directly.
>
> Replace “status” with a `linkgit` on `--null`.
>
> Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
> ---

This got no raction so far, but given that "commit --dry-run" and
"status" share quite a lot of the internals, referring from one to
the other often makes sense.

Will mark for 'next'.

Thanks.

>
> Notes (series):
>     § Cc
>     
>     Cc Peff based on:
>     
>     • f3f47a1e (status: add --long output format option, 2012-10-18) did not
>       • Did not link to git-config(1)
>     link to git-config(1) even though the previous
>     • 7c9f7038 (commit: support alternate status formats, 2009-09-05)
>       • This older commit did
>     
>     I was going to mention these when I was only changing `--long` but the
>     scope expanded to the other two options.
>
>  Documentation/git-commit.adoc | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/git-commit.adoc b/Documentation/git-commit.adoc
> index ae988a883b5..30121b3c861 100644
> --- a/Documentation/git-commit.adoc
> +++ b/Documentation/git-commit.adoc
> @@ -144,24 +144,26 @@ See linkgit:git-rebase[1] for details.
>  `--short`::
>  	When doing a dry-run, give the output in the short-format. See
>  	linkgit:git-status[1] for details. Implies `--dry-run`.
>  
>  `--branch`::
> -	Show the branch and tracking info even in short-format.
> +	Show the branch and tracking info even in short-format. See
> +	linkgit:git-status[1] for details.
>  
>  `--porcelain`::
>  	When doing a dry-run, give the output in a porcelain-ready
>  	format. See linkgit:git-status[1] for details. Implies
>  	`--dry-run`.
>  
>  `--long`::
> -	When doing a dry-run, give the output in the long-format.
> -	Implies `--dry-run`.
> +	When doing a dry-run, give the output in the long-format. This
> +	is the default output of linkgit:git-status[1]. Implies
> +	`--dry-run`.
>  
>  `-z`::
>  `--null`::
> -	When showing `short` or `porcelain` status output, print the
> +	When showing `short` or `porcelain` linkgit:git-status[1] output, print the
>  	filename verbatim and terminate the entries with _NUL_, instead of _LF_.
>  	If no format is given, implies the `--porcelain` output format.
>  	Without the `-z` option, filenames with "unusual" characters are
>  	quoted as explained for the configuration variable `core.quotePath`
>  	(see linkgit:git-config[1]).

```

## Jeff King, 2025-11-18 09:09

Subject: Re: [PATCH] doc: commit: link to git-status(1) on all format options
Message-ID: <20251118090952.GA17717@coredump.intra.peff.net>
URL: https://gitlist.dev/e/20251118090952.GA17717%40coredump.intra.peff.net
In-Reply-To: <c4349a03724.1763129061.git.code@khaugsbakk.name>

```
On Fri, Nov 14, 2025 at 03:04:47PM +0100, kristofferhaugsbakk@fastmail.com wrote:

> From: Kristoffer Haugsbakk <code@khaugsbakk.name>
> 
> `--branch` and `--long` refer to git-status(1) options but they don’t tell us
> what `short-format` and `long-format` are, respectively. And `--null`
> mentions “status” but does not link to the command.
> 
> Refer to git-config(1) on `--branch` like `--short` does.
> 
> `long-format` is the git-status(1) output. So we can just say that
> directly.
> 
> Replace “status” with a `linkgit` on `--null`.

Thanks, these all make sense to me.

>     Cc Peff based on:
>     
>     • f3f47a1e (status: add --long output format option, 2012-10-18) did not
>       • Did not link to git-config(1)
>     link to git-config(1) even though the previous
>     • 7c9f7038 (commit: support alternate status formats, 2009-09-05)
>       • This older commit did
>     
>     I was going to mention these when I was only changing `--long` but the
>     scope expanded to the other two options.

Yeah, I don't think I had a particular reason to link in one commit but
not the other. I can only say given the timestamps that I must have been
young and impetuous.

-Peff

```
