git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/5] submodule: add 'reversive' traversal options to foreach

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 2, 2026, 21:25 UTC
Message-ID
<xmqqecn2yh0r.fsf@gitster.g>
In-Reply-To
<1F5D3AAF-3E5E-4AD0-A48B-90B9D545FB21@gmail.com>
William Hatfield <whatfield.git@gmail.com> writes:
> Do you have any recommendation regarding names of these flags?

Not really. To be honest, I didn't even check to make sure what the behaviour was that your "--reverse" was implementing ;-).

> Do you have a preference for: —postorder-traversal or —bottom-up-traversal?

If all three kinds of *order makes sense to the submodule traversal, then --{pre,in,post}order would make sense. In other words, does there exist a good answer to this question:

    What does "--inorder-traversal" would do and when would it be
    useful, as opposed to --preorder and --postorder?

Otherwise, the distinction between --bottom-up vs --top-down may be sufficient to explain, and may explain the concept using more familiar terms to us non-mathematics types.

> What about: —include-superpoject or —execute-in-superproject-last?

Depends on what you are trying to tell the command to do with these options.

The former sounds as if you are saying "we usually do these things only in submodules and never in superproject. But with this option I am telling you to do the same in superproject after you are done doing them in all the submoudles".

On the other hand, the latter sounds more like "do these things in each and every repository (both submodules and the superproject), but make sure the repository for superproject is handled after all others."

Thanks.
Previous: William Hatfield
Message 11 of 11 in “submodule: add 'reversive' traversal options to foreach”
  1. 0/5 submodule: add 'reversive' traversal options to foreachWilliam Hatfield, Jan 31, 2026
  2. 1/5 t7425: add tests for reversive submodule traversalWilliam Hatfield, Jan 31, 2026
  3. 2/5 submodule: teach and plumb reverse-traversal behaviorWilliam Hatfield, Jan 31, 2026
  4. 3/5 submodule: teach and plumb append-superproject behaviorWilliam Hatfield, Jan 31, 2026
  5. 4/5 submodule: introduce reversive shorthand modeWilliam Hatfield, Jan 31, 2026
  6. 5/5 doc: document reversive traversal and related modesWilliam Hatfield, Jan 31, 2026
  7. Jean-Noël AVILAFeb 1, 2026
  8. William HatfieldFeb 2, 2026
  9. Junio C HamanoFeb 2, 2026
  10. William HatfieldFeb 2, 2026
  11. Junio C HamanoFeb 2, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.