git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Karthik Nayak <karthik.188@gmail.com>
To: git@vger.kernel.org
Cc: Karthik Nayak <karthik.188@gmail.com>,
	 Junio C Hamano <gitster@pobox.com>
Subject: [PATCH 3/5] for-each-ref: reword the documentation for '--start-after'
Date: Thu, 24 Jul 2025 10:14:44 +0200	[thread overview]
Message-ID: <20250724-kn-small-cleanups-v1-3-0c70f591de3e@gmail.com> (raw)
In-Reply-To: <20250724-kn-small-cleanups-v1-0-0c70f591de3e@gmail.com>

The documentation for '--start-after' states that the flag cannot be
used with general pattern matching. This is a bit vague, since there is
no clear understanding about what 'general' means here. Rewrite the
sentence to be more specific.

While here, fix a typo in the 'OPT_STRING'.

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
---
 Documentation/git-for-each-ref.adoc | 3 ++-
 builtin/for-each-ref.c              | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-for-each-ref.adoc b/Documentation/git-for-each-ref.adoc
index a170de4209..48af302a6f 100644
--- a/Documentation/git-for-each-ref.adoc
+++ b/Documentation/git-for-each-ref.adoc
@@ -114,7 +114,8 @@ TAB %(refname)`.
     deleted, modified or added between invocations. Output will only yield those
     references which follow the marker lexicographically. Output begins from the
     first reference that would come after the marker alphabetically. Cannot be
-    used with general pattern matching or custom sort options.
+    used with `--sort=<key>` or `--stdin` options, or the _<pattern>_ argument(s)
+    to limit the refs.
 
 FIELD NAMES
 -----------
diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c
index 3f21598046..79a79212c9 100644
--- a/builtin/for-each-ref.c
+++ b/builtin/for-each-ref.c
@@ -45,7 +45,7 @@ int cmd_for_each_ref(int argc,
 		OPT_GROUP(""),
 		OPT_INTEGER( 0 , "count", &format.array_opts.max_count, N_("show only <n> matched refs")),
 		OPT_STRING(  0 , "format", &format.format, N_("format"), N_("format to use for the output")),
-		OPT_STRING(  0 , "start-after", &filter.start_after, N_("start-start"), N_("start iteration after the provided marker")),
+		OPT_STRING(  0 , "start-after", &filter.start_after, N_("start-after"), N_("start iteration after the provided marker")),
 		OPT__COLOR(&format.use_color, N_("respect format colors")),
 		OPT_REF_FILTER_EXCLUDE(&filter),
 		OPT_REF_SORT(&sorting_options),

-- 
2.49.0


  parent reply	other threads:[~2025-07-24  8:14 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-24  8:14 [PATCH 0/5] ref-filter: small cleanups and fixes Karthik Nayak
2025-07-24  8:14 ` [PATCH 1/5] ref-cache: use 'size_t' instead of int for length Karthik Nayak
2025-07-24 17:17   ` Junio C Hamano
2025-07-24  8:14 ` [PATCH 2/5] for-each-ref: fix documentation argument ordering Karthik Nayak
2025-07-24 17:27   ` Junio C Hamano
2025-07-24 22:14     ` Karthik Nayak
2025-07-24 22:32       ` Junio C Hamano
2025-07-28 20:19         ` Karthik Nayak
2025-07-25 10:55   ` Patrick Steinhardt
2025-07-28 20:18     ` Karthik Nayak
2025-07-24  8:14 ` Karthik Nayak [this message]
2025-07-25 10:55   ` [PATCH 3/5] for-each-ref: reword the documentation for '--start-after' Patrick Steinhardt
2025-07-24  8:14 ` [PATCH 4/5] t6302: add test combining '--start-after' with '--exclude' Karthik Nayak
2025-07-24  8:14 ` [PATCH 5/5] ref-filter: use REF_ITERATOR_SEEK_SET_PREFIX instead of '1' Karthik Nayak
2025-07-24 17:41 ` [PATCH 0/5] ref-filter: small cleanups and fixes Junio C Hamano
2025-07-28 20:20 ` [PATCH v2 " Karthik Nayak
2025-07-28 20:20   ` [PATCH v2 1/5] ref-cache: use 'size_t' instead of int for length Karthik Nayak
2025-07-28 20:20   ` [PATCH v2 2/5] for-each-ref: fix documentation argument ordering Karthik Nayak
2025-07-28 20:20   ` [PATCH v2 3/5] for-each-ref: reword the documentation for '--start-after' Karthik Nayak
2025-07-28 20:20   ` [PATCH v2 4/5] t6302: add test combining '--start-after' with '--exclude' Karthik Nayak
2025-07-28 20:20   ` [PATCH v2 5/5] ref-filter: use REF_ITERATOR_SEEK_SET_PREFIX instead of '1' Karthik Nayak
2025-07-29  8:04   ` [PATCH v2 0/5] ref-filter: small cleanups and fixes Patrick Steinhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250724-kn-small-cleanups-v1-3-0c70f591de3e@gmail.com \
    --to=karthik.188@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).