From 478a0acb222636a866b99d2ae47eb04f0516bfbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20GERBES?= Date: Tue, 26 Dec 2017 17:59:11 +0100 Subject: [PATCH 1/2] Add Prefix Option https://github.com/ingydotnet/git-subrepo/issues/319 --- lib/git-subrepo | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/git-subrepo b/lib/git-subrepo index ac81f380..97277ee8 100755 --- a/lib/git-subrepo +++ b/lib/git-subrepo @@ -69,6 +69,7 @@ F,fetch Fetch the upstream content first M,method= Method when you join, valid options are 'merge' or 'rebase' Default is 'merge' m,message= Specify a commit message +p,prefix= Specify a prefix for any commit message r,remote= Specify the upstream remote to push/pull/fetch s,squash Squash commits on push u,update Add the --branch and/or --remote overrides to .gitrepo @@ -123,9 +124,10 @@ main() { local override_remote= # Remote specified with -r local override_branch= # Remote specified with -b - + local edit_wanted=false # Edit commit message using -e local wanted_commit_message= # Custom commit message using -m + local prefix_commit_message= # Custom commit prefix message using -p local join_method= # Current join method (rebase/merge) @@ -1011,6 +1013,8 @@ get-command-options() { -F) fetch_wanted=true ;; -m) wanted_commit_message="$1" shift;; + -p) prefix_commit_message="$1" + shift;; -M) join_method="$1" shift;; -M) join_method="$1" @@ -1578,7 +1582,7 @@ get-commit-message() { # Format subrepo commit message: cat <<... -git subrepo $command$is_merge ${args[@]} +${prefix_commit_message}git subrepo $command$is_merge ${args[@]} subrepo: subdir: "$subdir" From 044201de43a83c9bf446d47d90919ec70ea5501b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20GERBES?= Date: Wed, 27 Dec 2017 10:13:26 +0100 Subject: [PATCH 2/2] Remove this extra white space. --- lib/git-subrepo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git-subrepo b/lib/git-subrepo index 97277ee8..cd4f1d00 100755 --- a/lib/git-subrepo +++ b/lib/git-subrepo @@ -124,7 +124,7 @@ main() { local override_remote= # Remote specified with -r local override_branch= # Remote specified with -b - + local edit_wanted=false # Edit commit message using -e local wanted_commit_message= # Custom commit message using -m local prefix_commit_message= # Custom commit prefix message using -p