From 9ae323d0c6a298d7e7d1e45a639306ddb6f1aa90 Mon Sep 17 00:00:00 2001 From: Janik von Rotz Date: Mon, 27 Apr 2026 14:33:42 +0200 Subject: [PATCH] feat(git-folder): swap url and branch parameters in add-git-folder and update docs --- bin/add-git-folder | 8 ++++---- library.md | 2 +- task.template | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/add-git-folder b/bin/add-git-folder index 235445d..86dae94 100755 --- a/bin/add-git-folder +++ b/bin/add-git-folder @@ -2,19 +2,19 @@ add-git-folder() { if [[ -z "$1" ]]; then - echo '$1/branch is empty.' + echo '$1/url is empty.' exit fi if [[ -z "$2" ]]; then - echo '$2/url is empty.' + echo '$2/branch is empty.' exit fi if [[ -z "$3" ]]; then echo '$3/path is empty.' exit fi - local branch="$1" - local url="$2" + local url="$1" + local branch="$2" local path="$3" # Clone the repo diff --git a/library.md b/library.md index dc7ae7f..57d1b1d 100644 --- a/library.md +++ b/library.md @@ -276,7 +276,7 @@ These commands replace the `git submodule` command. The commands store and retri ### add-git-folder ```bash -rows+=("add-git-folder|[branch][url][path]|Add git folder to .gitmodules.") +rows+=("add-git-folder|[url][branch][path]|Add git folder to .gitmodules.") ``` ### add-git-merge diff --git a/task.template b/task.template index ee3cf56..06d24ac 100755 --- a/task.template +++ b/task.template @@ -44,8 +44,8 @@ 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.") - rows+=("add-git-merge|[remote][merge][path]|Add git merge ref to git folder in .gitmodules.") + rows+=("add-git-folder|[url][branch][path]|Add git folder to .gitmodules.") + rows+=("add-git-merge|[remote][branch][path]|Add git merge ref to gitmodules.") rows+=("add-git-remote|[remote][url][path]|Add git remote to git folder.") 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.")