feat(save-git-folder): add new command to save git refs to .gitmodules.csv and update help-table
This commit is contained in:
3 files changed
+18
No files matched your search
Executable
+12
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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.")
|
||||
|
||||
Reference in new issue
Block a user