feat(save-git-folder): add new command to save git refs to .gitmodules.csv and update help-table

This commit is contained in:
Janik von Rotz committed 2026-03-12 17:27:20 +01:00
1 parent b380826239
commit 760c5d8003
3 files changed
+18

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
save-git-folder() {
echo "Save git refs to .gitmodules.csv."
local git_folders=$(ls-git-folder .)
echo "path,rev" > ".gitmodules.csv"
for git_folder in $git_folders; do
local commit_ref=$(git -C "$git_folder" rev-parse HEAD)
echo "$git_folder,$commit_ref" >> ".gitmodules.csv"
done
}
+5
View File
@@ -372,6 +372,11 @@ rows+=("stage-git-folder|[path]|Stage all files in git folders from .gitmodules
rows+=("status-git-folder|[path]|Show status of git folders from .gitmodules file.")
```
### save-git-folder
```bash
rows+=("save-git-folder||Save references to .gitmodules.csv.")
```
### update-submodule
```bash
+1
View File
@@ -44,6 +44,7 @@ help-table() {
rows+=("log-success||Colored output for success.")
rows+=("log-warning||Colored output for warnings.")
rows+=("===Git===| | ")
rows+=("add-git-folder|[branch][url][path]|Add git folder to .gitmodules and .gitmodule.csv.")
rows+=("aggregate-git-folders|[path]|Run gitaggregate for the repos.yaml.")
rows+=("commit-git-folder|[message][path]|Commit all changes in git folders in path.")
rows+=("clean-git-folder|[path]|Clean git folder.")