From: William Hatfield <whatfield.git@gmail.com>
To: git@vger.kernel.org
Cc: glencbz@gmail.com, avarab@gmail.com, gitster@pobox.com,
ps@pks.im, William Hatfield <whatfield.git@gmail.com>
Subject: [PATCH 5/5] doc: document reversive traversal and related modes
Date: Sat, 31 Jan 2026 16:43:09 -0500 [thread overview]
Message-ID: <20260131214309.1899376-6-whatfield.git@gmail.com> (raw)
In-Reply-To: <20260131214309.1899376-1-whatfield.git@gmail.com>
Add documentation for the new --reverse-traversal, --append-superproject,
and --reversive flags to git-submodule.adoc. These flags enable post-order
traversal through nested submodule hierarchies, which is useful for
cleanup operations and dependency-ordered processing.
The flags only take effect when used with --recursive.
Signed-off-by: William Hatfield <whatfield.git@gmail.com>
---
Documentation/git-submodule.adoc | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/Documentation/git-submodule.adoc b/Documentation/git-submodule.adoc
index 95beaee561..2be477952d 100644
--- a/Documentation/git-submodule.adoc
+++ b/Documentation/git-submodule.adoc
@@ -437,6 +437,26 @@ options carefully.
only in the submodules of the current repo, but also
in any nested submodules inside those submodules (and so on).
+--reverse-traversal::
+ This option is only valid for the foreach command and requires
+ `--recursive`. Process nested submodules in post-order (deepest
+ first) rather than the default pre-order. This is useful for
+ cleanup operations where nested submodules must be processed
+ before their parents.
+
+--append-superproject::
+ This option is only valid for the foreach command and requires
+ `--recursive`. After processing all submodules, also run the
+ command in the superproject (top-level repository). The
+ superproject is displayed as `../<name>` to mirror submodule
+ output style.
+
+--reversive::
+ This option is only valid for the foreach command and is
+ shorthand for `--recursive --reverse-traversal --append-superproject`.
+ It provides a complete "reverse" traversal: deepest submodules
+ first, then their parents, and finally the superproject.
+
--depth::
This option is valid for add and update commands. Create a 'shallow'
clone with a history truncated to the specified number of revisions.
--
2.53.0-rc0
next prev parent reply other threads:[~2026-01-31 21:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-31 21:43 [PATCH 0/5] submodule: add 'reversive' traversal options to foreach William Hatfield
2026-01-31 21:43 ` [PATCH 1/5] t7425: add tests for reversive submodule traversal William Hatfield
2026-01-31 21:43 ` [PATCH 2/5] submodule: teach and plumb reverse-traversal behavior William Hatfield
2026-01-31 21:43 ` [PATCH 3/5] submodule: teach and plumb append-superproject behavior William Hatfield
2026-01-31 21:43 ` [PATCH 4/5] submodule: introduce reversive shorthand mode William Hatfield
2026-01-31 21:43 ` William Hatfield [this message]
2026-02-01 9:03 ` [PATCH 5/5] doc: document reversive traversal and related modes Jean-Noël AVILA
2026-02-02 21:10 ` William Hatfield
2026-02-02 18:52 ` [PATCH 0/5] submodule: add 'reversive' traversal options to foreach Junio C Hamano
2026-02-02 21:02 ` William Hatfield
2026-02-02 21:25 ` Junio C Hamano
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=20260131214309.1899376-6-whatfield.git@gmail.com \
--to=whatfield.git@gmail.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=glencbz@gmail.com \
--cc=ps@pks.im \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.