Skip to content

add submodule foreach#10

Merged
tib merged 1 commit into
BinaryBirds:mainfrom
armcknight:submodule-foreach
Mar 17, 2025
Merged

add submodule foreach#10
tib merged 1 commit into
BinaryBirds:mainfrom
armcknight:submodule-foreach

Conversation

@armcknight
Copy link
Copy Markdown
Collaborator

i need to be able to iterate through submodules.

the way this API is growing, with submoduleUpdate etc, makes me think that long term it'd probably be better to have a sub-enum for submodule aliases, which then has a case for each submodule command:

       git submodule [--quiet] [--cached]
       git submodule [--quiet] add [<options>] [--] <repository> [<path>]
       git submodule [--quiet] status [--cached] [--recursive] [--] [<path>...]
       git submodule [--quiet] init [--] [<path>...]
       git submodule [--quiet] deinit [-f|--force] (--all|[--] <path>...)
       git submodule [--quiet] update [<options>] [--] [<path>...]
       git submodule [--quiet] set-branch [<options>] [--] <path>
       git submodule [--quiet] set-url [--] <path> <newurl>
       git submodule [--quiet] summary [<options>] [--] [<path>...]
       git submodule [--quiet] foreach [--recursive] <command>
       git submodule [--quiet] sync [--recursive] [--] [<path>...]
       git submodule [--quiet] absorbgitdirs [--] [<path>...]
       ```

@tib
Copy link
Copy Markdown
Member

tib commented Mar 17, 2025

Totally agree with the API changes you proposed. Feel free to submit a PR if you wish.

@tib tib merged commit 92cb559 into BinaryBirds:main Mar 17, 2025
@armcknight armcknight deleted the submodule-foreach branch April 14, 2025 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants