Re: [PATCH 2/2] builtin/show-ref.c: limit output with `--count`
From: Junio C Hamano <hidden>
Date: 2022-06-08 16:10:42
Ævar Arnfjörð Bjarmason [off-list ref] writes:
On Tue, Jun 07 2022, Taylor Blau wrote:quoted
On Tue, Jun 07, 2022 at 10:07:32AM +0200, Ævar Arnfjörð Bjarmason wrote:quoted
On Mon, Jun 06 2022, Taylor Blau wrote:quoted
diff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt index ab4d271925..28256c04dd 100644 --- a/Documentation/git-show-ref.txt +++ b/Documentation/git-show-ref.txt@@ -10,7 +10,7 @@ SYNOPSIS [verse] 'git show-ref' [-q|--quiet] [--verify] [--head] [-d|--dereference] [-s|--hash[=<n>]] [--abbrev[=<n>]] [--tags] - [--heads] [--] [<pattern>...] + [--heads] [--count=<n>] [--] [<pattern>...]In addition to what Junio noted, the SYNOPSIS is now inaccurate per your documentation. I.e. if this option is incompatible with --verify and --exclude-existing we should use "|" to indicate that, e.g.: [ [--verify] [--exclude-existing] | --count=<n> ]Good catch. Should this be squashed into the first example in the SYNOPSIS, the second, or a new one?Personally I really don't care if the end-state is good :)
Heh. I actually do think that the proposed documentation is correct; the implementation that excludes these two options from the "count" feature is buggy.