Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package git-subrepo for openSUSE:Factory 
checked in at 2022-12-05 18:01:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/git-subrepo (Old)
 and      /work/SRC/openSUSE:Factory/.git-subrepo.new.1835 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "git-subrepo"

Mon Dec  5 18:01:07 2022 rev:3 rq:1040061 version:0.4.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/git-subrepo/git-subrepo.changes  2020-11-24 
22:14:43.951620823 +0100
+++ /work/SRC/openSUSE:Factory/.git-subrepo.new.1835/git-subrepo.changes        
2022-12-05 18:01:12.092581709 +0100
@@ -1,0 +2,16 @@
+Sun Dec  4 21:19:52 UTC 2022 - Dirk Müller <[email protected]>
+
+- update to 0.4.5:
+  * Add --file option
+  * Fix git subrepo status command for subrepos that share a common prefix.
+  * Don't allow -b and --all
+  * Fix documentation links
+  * fix tests to support use of a default branch git config that is not
+    "master"
+  * pass --force to git add so a user's global .gitignore does not affect
+    tests
+  * Fix .rc and enable-completion.sh for zsh before 5.1
+  * Better format for options
+  * The fpath variable is an array; expand correctly
+
+-------------------------------------------------------------------

Old:
----
  0.4.3.tar.gz

New:
----
  0.4.5.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ git-subrepo.spec ++++++
--- /var/tmp/diff_new_pack.ATREvQ/_old  2022-12-05 18:01:12.844585804 +0100
+++ /var/tmp/diff_new_pack.ATREvQ/_new  2022-12-05 18:01:12.852585847 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package git-subrepo
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,19 +17,19 @@
 
 
 Name:           git-subrepo
-Version:        0.4.3
+Version:        0.4.5
 Release:        0
 Summary:        Git Submodule Alternative
 License:        MIT
 Group:          Development/Tools/Version Control
 URL:            https://github.com/ingydotnet/git-subrepo
-Source:         https://github.com/ingydotnet/git-subrepo/archive/0.4.3.tar.gz
+Source:         
https://github.com/ingydotnet/git-subrepo/archive/%{version}.tar.gz
 Patch0:         fix-shebangs.patch
 BuildRequires:  bash >= 4
-BuildRequires:  git >= 2.7
+BuildRequires:  git-core >= 2.7
 BuildRequires:  make
 Requires:       bash >= 4
-Requires:       git >= 2.7
+Requires:       git-core >= 2.7
 BuildArch:      noarch
 
 %description

++++++ 0.4.3.tar.gz -> 0.4.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-subrepo-0.4.3/.rc new/git-subrepo-0.4.5/.rc
--- old/git-subrepo-0.4.3/.rc   2020-11-21 21:41:56.000000000 +0100
+++ new/git-subrepo-0.4.5/.rc   2022-09-23 05:38:10.000000000 +0200
@@ -13,7 +13,7 @@
 #
 #------------------------------------------------------------------------------
 
-[[ ${ZSH_VERSION-} ]] &&
+[[ -n ${ZSH_VERSION-} ]] &&
   GIT_SUBREPO_ROOT=$0 ||
   GIT_SUBREPO_ROOT=$BASH_SOURCE
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-subrepo-0.4.3/Changes 
new/git-subrepo-0.4.5/Changes
--- old/git-subrepo-0.4.3/Changes       2020-11-21 21:41:56.000000000 +0100
+++ new/git-subrepo-0.4.5/Changes       2022-09-23 05:38:10.000000000 +0200
@@ -1,4 +1,16 @@
 ---
+version: 0.4.5
+date:    Thu 22 Sep 2022 23:03:24 PM EST
+- Add --file option
+- Fix git subrepo status command for subrepos that share a common prefix. 
Closes #534.
+- Don't allow -b and --all
+- Fix documentation links
+- fix tests to support use of a default branch git config that is not "master"
+- pass --force to git add so a user's global .gitignore does not affect tests
+- Fix .rc and enable-completion.sh for zsh before 5.1
+- Better format for options
+- The `fpath` variable is an array; expand correctly
+---
 version: 0.4.3
 date:    Sat 21 Nov 2020 03:28:43 PM EST
 - Apply PR#511 to fix a 0.4.2 regression in zsh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-subrepo-0.4.3/Meta new/git-subrepo-0.4.5/Meta
--- old/git-subrepo-0.4.3/Meta  2020-11-21 21:41:56.000000000 +0100
+++ new/git-subrepo-0.4.5/Meta  2022-09-23 05:38:10.000000000 +0200
@@ -1,11 +1,11 @@
 =meta: 0.0.2
 
 name: git-subrepo
-version: 0.4.3
+version: 0.4.5
 abstract: Git Submodule Alternative
 homepage: https://github.com/ingydotnet/git-subrepo#readme
 license: MIT
-copyright: 2013-2020
+copyright: 2013-2022
 
 author:
   name: Ingy döt Net
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-subrepo-0.4.3/ReadMe.pod 
new/git-subrepo-0.4.5/ReadMe.pod
--- old/git-subrepo-0.4.3/ReadMe.pod    2020-11-21 21:41:56.000000000 +0100
+++ new/git-subrepo-0.4.5/ReadMe.pod    2022-09-23 05:38:10.000000000 +0200
@@ -128,7 +128,7 @@
 
 =over
 
-=item C<< git subrepo clone <repository> [<subdir>] [-b <branch>] [-f] [-m 
<msg>] [-e] [--method <merge|rebase>] >>
+=item C<< git subrepo clone <repository> [<subdir>] [-b <branch>] [-f] [-m 
<msg>] [--file=<msg file>] [-e] [--method <merge|rebase>] >>
 
 Add a repository as a subrepo in a subdir of your repository.
 
@@ -150,8 +150,8 @@
 The C<--method> option will decide how the join process between branches are
 performed. The default option is merge.
 
-The C<clone> command accepts the C<--branch=> C<--edit>, C<--force> and C<--
-message=> options.
+The C<clone> command accepts the C<--branch=> C<--edit>, C<--file>, C<--force>
+and C<--message=> options.
 
 =item C<< git subrepo init <subdir> [-r <remote>] [-b <branch>] [--method 
<merge|rebase>] >>
 
@@ -160,15 +160,13 @@
 If you want to expose a subdirectory of your project as a published subrepo,
 this command will do that. It will split out the content of a normal
 subdirectory into a branch and start tracking it as a subrepo. Afterwards your
-original repo will look exactly the same except that there will be a C<<
-<subdir>/.gitrepo >> file.
+original repo will look exactly the same except that there will be a 
C<<<subdir>/.gitrepo >> file.
 
 If you specify the C<--remote> (and optionally the C<--branch>) option, the
 values will be added to the C<< <subdir>/.gitrepo >> file. The C<--remote>
 option is the upstream URL, and the C<--branch> option is the upstream branch
 to push to. These values will be needed to do a C<git subrepo push> command,
-but they can be provided later on the C<push> command (and saved to C<<
-<subdir>/.gitrepo >> if you also specify the C<--update> option).
+but they can be provided later on the C<push> command (and saved to 
C<<<subdir>/.gitrepo >> if you also specify the C<--update> option).
 
 Note: You will need to create the empty upstream repo and push to it on your
       own, using C<< git subrepo push <subdir> >>.
@@ -178,7 +176,7 @@
 
 The C<init> command accepts the C<--branch=> and C<--remote=> options.
 
-=item C<< git subrepo pull <subdir>|--all [-M|-R|-f] [-m <msg>] [-e] [-b 
<branch>] [-r <remote>] [-u] >>
+=item C<< git subrepo pull <subdir>|--all [-M|-R|-f] [-m <msg>] [--file=<msg 
file>] [-e] [-b <branch>] [-r <remote>] [-u] >>
 
 Update the subrepo subdir with the latest upstream changes.
 
@@ -223,10 +221,10 @@
 
 The set of commands used above are described in detail below.
 
-The C<pull> command accepts the C<--all>, C<--branch=>, C<--edit>, C<--force>,
-C<--message=>, C<--remote=> and C<--update> options.
+The C<pull> command accepts the C<--all>, C<--branch=>, C<--edit>, C<--file>,
+C<--force>, C<--message=>, C<--remote=> and C<--update> options.
 
-=item C<< git subrepo push <subdir>|--all [<branch>] [-r <remote>] [-b 
<branch>] [-M|-R] [-u] [-f] [-s] [-N] >>
+=item C<< git subrepo push <subdir>|--all [<branch>] [-m msg] [--file=<msg 
file>] [-r <remote>] [-b <branch>] [-M|-R] [-u] [-f] [-s] [-N] >>
 
 Push a properly merged subrepo branch back upstream.
 
@@ -250,9 +248,7 @@
 discouraged. Only use this option if you fully understand it. (The C<--force>
 option will NOT check for a proper merge. ANY branch will be force pushed!)
 
-The C<push> command accepts the C<--all>, C<--branch=>, C<--dry-run>, C<--
-force>, C<--merge>, C<--rebase>, C<--remote=>, C<--squash> and C<--
-update> options.
+The C<push> command accepts the C<--all>, C<--branch=>, C<--dry-run>, 
C<--file>, C<--force>, C<--merge>, C<--message>, C<--rebase>, C<--remote=>, 
C<--squash> and C<--update> options.
 
 =item C<< git subrepo fetch <subdir>|--all [-r <remote>] [-b <branch>] >>
 
@@ -263,8 +259,7 @@
 called C<< subrepo/<subdir> >>. These are temporary and you can easily remove
 them with the subrepo C<clean> command.
 
-The C<fetch> command accepts the C<--all>, C<--branch=> and C<--
-remote=> options.
+The C<fetch> command accepts the C<--all>, C<--branch=> and C<--remote=> 
options.
 
 =item C<< git subrepo branch <subdir>|--all [-f] [-F] >>
 
@@ -280,12 +275,11 @@
 
 The C<branch> command accepts the C<--all>, C<--fetch> and C<--force> options.
 
-=item C<< git subrepo commit <subdir> [<subrepo-ref>] [-m <msg>] [-e] [-f] 
[-F] >>
+=item C<< git subrepo commit <subdir> [<subrepo-ref>] [-m <msg>] [--file=<msg 
file>] [-e] [-f] [-F] >>
 
 Add subrepo branch to current history as a single commit.
 
-This command is generally used after a hand-merge. You have done a C<subrepo
-branch> and merged (rebased) it with the upstream. This command takes the HEAD
+This command is generally used after a hand-merge. You have done a 
C<subrepobranch> and merged (rebased) it with the upstream. This command takes 
the HEAD
 of that branch, puts its content into the subrepo subdir and adds a new commit
 for it to the top of your mainline history.
 
@@ -293,13 +287,12 @@
 branch history. That way the same branch can push upstream. Use the C<--force>
 option to commit anyway.
 
-The C<commit> command accepts the C<--edit>, C<--fetch>, C<--force> and C<--
-message=> options.
+The C<commit> command accepts the C<--edit>, C<--fetch>, C<--file>, C<--force>
+and C<--message=> options.
 
 =item C<< git subrepo status [<subdir>|--all|--ALL] [-F] [-q|-v] >>
 
-Get the status of a subrepo. Uses the C<--all> option by default. If the C<--
-quiet> flag is used, just print the subrepo names, one per line.
+Get the status of a subrepo. Uses the C<--all> option by default. If the 
C<--quiet> flag is used, just print the subrepo names, one per line.
 
 The C<--verbose> option will show all the recent local and upstream commits.
 
@@ -416,6 +409,10 @@
 
 Use this option to fetch the upstream commits, before running the command.
 
+=item C<< --file=<commit msg file> >>
+
+Supply your own commit message from a file
+
 =item C<--force> (C<-f>)
 
 Use this option to force certain commands that fail in the general case.
@@ -486,8 +483,7 @@
 
 =item C<GIT_SUBREPO_ROOT>
 
-This is set by the C<.rc> file, if you use that method to install / enable 
C<git-
-subrepo>. It contains the path of the C<git-subrepo> repository.
+This is set by the C<.rc> file, if you use that method to install / enable 
C<git-subrepo>. It contains the path of the C<git-subrepo> repository.
 
 =item C<GIT_SUBREPO_RUNNING>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-subrepo-0.4.3/doc/git-subrepo.swim 
new/git-subrepo-0.4.5/doc/git-subrepo.swim
--- old/git-subrepo-0.4.3/doc/git-subrepo.swim  2020-11-21 21:41:56.000000000 
+0100
+++ new/git-subrepo-0.4.5/doc/git-subrepo.swim  2022-09-23 05:38:10.000000000 
+0200
@@ -88,7 +88,7 @@
 Please note that the commands are /not/ exact equivalents, and do not take all
 the same arguments. Keep reading…
 
-- `git subrepo clone <repository> [<subdir>] [-b <branch>] [-f] [-m <msg>] 
[-e] [--method <merge|rebase>]`
+- `git subrepo clone <repository> [<subdir>] [-b <branch>] [-f] [-m <msg>] 
[--file=<msg file>] [-e] [--method <merge|rebase>]`
 
   Add a repository as a subrepo in a subdir of your repository.
 
@@ -110,8 +110,8 @@
   The `--method` option will decide how the join process between branches are
    performed. The default option is merge.
 
-  The `clone` command accepts the `--branch=` `--edit`, `--force` and
-  `--message=` options.
+  The `clone` command accepts the `--branch=` `--edit`, `--file`, `--force`
+  and `--message=` options.
 
 - `git subrepo init <subdir> [-r <remote>] [-b <branch>] [--method 
<merge|rebase>]`
 
@@ -126,7 +126,7 @@
   If you specify the `--remote` (and optionally the `--branch`) option, the
   values will be added to the `<subdir>/.gitrepo` file. The `--remote` option
   is the upstream URL, and the `--branch` option is the upstream branch to push
-  to. These values will be needed to do a `git subrepo push` command, but they
+  to. These values will be needed to do a `git subrepo push` command, but they
   can be provided later on the `push` command (and saved to `<subdir>/.gitrepo`
   if you also specify the `--update` option).
 
@@ -138,7 +138,7 @@
 
   The `init` command accepts the `--branch=` and `--remote=` options.
 
-- `git subrepo pull <subdir>|--all [-M|-R|-f] [-m <msg>] [-e] [-b <branch>] 
[-r <remote>] [-u]`
+- `git subrepo pull <subdir>|--all [-M|-R|-f] [-m <msg>] [--file=<msg file>] 
[-e] [-b <branch>] [-r <remote>] [-u]`
 
   Update the subrepo subdir with the latest upstream changes.
 
@@ -183,10 +183,10 @@
 
   The set of commands used above are described in detail below.
 
-  The `pull` command accepts the `--all`, `--branch=`, `--edit`, `--force`,
-  `--message=`, `--remote=` and `--update` options.
+  The `pull` command accepts the `--all`, `--branch=`, `--edit`, `--file`,
+  `--force`, `--message=`, `--remote=` and `--update` options.
 
-- `git subrepo push <subdir>|--all [<branch>] [-r <remote>] [-b <branch>] 
[-M|-R] [-u] [-f] [-s] [-N]`
+- `git subrepo push <subdir>|--all [<branch>] [-m msg] [--file=<msg file>] [-r 
<remote>] [-b <branch>] [-M|-R] [-u] [-f] [-s] [-N]`
 
   Push a properly merged subrepo branch back upstream.
 
@@ -210,8 +210,9 @@
   discouraged. Only use this option if you fully understand it. (The `--force`
   option will NOT check for a proper merge. ANY branch will be force pushed!)
 
-  The `push` command accepts the `--all`, `--branch=`, `--dry-run`, `--force`,
-  `--merge`, `--rebase`, `--remote=`, `--squash` and `--update` options.
+  The `push` command accepts the `--all`, `--branch=`, `--dry-run`, `--file`,
+  `--force`, `--merge`, `--message`, `--rebase`, `--remote=`, `--squash` and
+  `--update` options.
 
 - `git subrepo fetch <subdir>|--all [-r <remote>] [-b <branch>]`
 
@@ -237,7 +238,7 @@
 
   The `branch` command accepts the `--all`, `--fetch` and `--force` options.
 
-- `git subrepo commit <subdir> [<subrepo-ref>] [-m <msg>] [-e] [-f] [-F]`
+- `git subrepo commit <subdir> [<subrepo-ref>] [-m <msg>] [--file=<msg file>] 
[-e] [-f] [-F]`
 
   Add subrepo branch to current history as a single commit.
 
@@ -250,8 +251,8 @@
   branch history. That way the same branch can push upstream. Use the
   `--force` option to commit anyway.
 
-  The `commit` command accepts the `--edit`, `--fetch`, `--force` and
-  `--message=` options.
+  The `commit` command accepts the `--edit`, `--fetch`, `--file`, `--force`
+  and `--message=` options.
 
 - `git subrepo status [<subdir>|--all|--ALL] [-F] [-q|-v]`
 
@@ -368,6 +369,10 @@
 
   Use this option to fetch the upstream commits, before running the command.
 
+- `--file=<commit msg file>`
+
+  Supply your own commit message from a file
+
 - `--force` (`-f`)
 
   Use this option to force certain commands that fail in the general case.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-subrepo-0.4.3/lib/git-subrepo 
new/git-subrepo-0.4.5/lib/git-subrepo
--- old/git-subrepo-0.4.3/lib/git-subrepo       2020-11-21 21:41:56.000000000 
+0100
+++ new/git-subrepo-0.4.5/lib/git-subrepo       2022-09-23 05:38:10.000000000 
+0200
@@ -30,7 +30,7 @@
 bash+:import :std can version-check
 
 
-VERSION=0.4.3
+VERSION=0.4.5
 REQUIRED_BASH_VERSION=4.0
 REQUIRED_GIT_VERSION=2.7.0
 GIT_TMP=$(git rev-parse --git-common-dir 2> /dev/null || echo .git)/tmp
@@ -64,20 +64,20 @@
 h           Show the command summary
 help        Help overview
 version     Print the git-subrepo version number
-
+ 
 a,all       Perform command on all current subrepos
 A,ALL       Perform command on all subrepos and subsubrepos
 b,branch=   Specify the upstream branch to push/pull/fetch
 e,edit      Edit commit message
 f,force     Force certain operations
 F,fetch     Fetch the upstream content first
-M,method=   Method when you join, valid options are 'merge' or 'rebase'
-            Default is 'merge'
+M,method=   Join method: 'merge' (default) or 'rebase'
 m,message=  Specify a commit message
+file=       Specify a commit message file
 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
-
+ 
 q,quiet     Show minimal output
 v,verbose   Show verbose output
 d,debug     Show the actual commands used
@@ -132,6 +132,7 @@
 
   local edit_wanted=false       # Edit commit message using -e
   local wanted_commit_message=  # Custom commit message using -m
+  local commit_msg_file=        # Custom commit message using --file
 
   local join_method=            # Current join method (rebase/merge)
 
@@ -158,6 +159,10 @@
   command-init
 
   if $all_wanted && [[ ! $command =~ ^(help|status)$ ]]; then
+    if [[ -n $subrepo_branch ]]; then
+      error "options --branch and --all are not compatible"
+    fi
+
     # Run the command on all subrepos
     local args=( "${command_arguments[@]}" )
     get-all-subrepos
@@ -682,7 +687,19 @@
   upstream_head_commit=$new_upstream_head_commit
   subrepo_commit_ref=$upstream_head_commit
   update-gitrepo-file
-  RUN git commit -m "$(get-commit-message)"
+
+  local commit_message
+  if [[ $wanted_commit_message ]]; then
+    commit_message=$wanted_commit_message
+  else
+    commit_message=$(get-commit-message)
+  fi
+
+  if [[ $commit_msg_file ]]; then
+    RUN git command --file "$commit_msg_file"
+  else
+    RUN git commit -m "$commit_message"
+  fi
 }
 
 # Fetch the subrepo's remote branch content:
@@ -869,13 +886,21 @@
 
   o "Commit to the '$original_head_branch' branch."
   if [[ $original_head_commit != none ]]; then
-    RUN git commit $edit_flag -m "$commit_message"
+    if [[ $commit_msg_file ]]; then
+      RUN git commit $edit_flag --file "$commit_msg_file"
+    else
+      RUN git commit $edit_flag -m "$commit_message"
+    fi
   else
     # We had cloned into an empty repo, side effect of prior git reset --mixed
     # command is that subrepo's history is now part of the index. Commit
     # without that history.
     OUT=true RUN git write-tree
-    OUT=true RUN git commit-tree $edit_flag -m "$commit_message" "$output"
+    if [[ $commit_msg_file ]]; then
+      OUT=true RUN git commit-tree $edit_flag --file "$commit_msg_file" 
"$output"
+    else
+      OUT=true RUN git commit-tree $edit_flag -m "$commit_message" "$output"
+    fi
     RUN git reset --hard "$output"
   fi
 
@@ -956,7 +981,7 @@
     local _worktree
     _worktree=$(
       git worktree list |
-        grep "$GIT_TMP/subrepo/$subdir"
+        grep "$GIT_TMP/subrepo/$subdir "
     ) || true
     if [[ $_worktree  ]]; then
       echo "  Worktree: $_worktree"
@@ -1036,7 +1061,11 @@
       -f) force_wanted=true
           commit_msg_args+=("--force") ;;
       -F) fetch_wanted=true ;;
-      -m) wanted_commit_message=$1
+      -m)
+          if [[ $commit_msg_file ]]; then
+            error "fatal: options '-m' and '--file' cannot be used together"
+          fi
+          wanted_commit_message=$1
           shift;;
       -M) join_method=$1
           shift;;
@@ -1051,6 +1080,16 @@
       -v) verbose_wanted=true ;;
       -d) debug_wanted=true ;;
       -x) set -x ;;
+      --file)
+        if [[ $wanted_commit_message ]]; then
+          error "fatal: options '-m' and '--file' cannot be used together"
+        fi
+        if [ -f "$1" ]; then
+          commit_msg_file="$1"
+        else
+          error "Commit msg file at $1 not found"
+        fi
+        shift ;;
       --version)
         echo "$VERSION"
         exit ;;
@@ -1086,7 +1125,7 @@
   if [[ $override_remote ]]; then
     check_option remote
   fi
-  if [[ $wanted_commit_message ]]; then
+  if [[ $wanted_commit_message || $commit_msg_file ]]; then
     check_option message
   fi
   if $update_wanted; then
@@ -1106,7 +1145,7 @@
 options_fetch='all branch remote'
 options_init='branch remote method'
 options_pull='all branch edit force message remote update'
-options_push='all branch force remote squash update'
+options_push='all branch force message remote squash update'
 options_status='ALL all fetch'
 check_option() {
   local var=options_${command//-/_}
@@ -1390,7 +1429,7 @@
 ; DO NOT EDIT (unless you know what you are doing)
 ;
 ; This subdirectory is a git "subrepo", and this file is maintained by the
-; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
+; git-subrepo command. See https://github.com/ingydotnet/git-subrepo#readme
 ;
 ...
     fi
@@ -1565,7 +1604,7 @@
 add-subrepo() {
   if ! $ALL_wanted; then
     for path in "${subrepos[@]}"; do
-      [[ $1 =~ ^$path ]] && return
+      [[ $1 =~ ^$path/ ]] && return
     done
   fi
   subrepos+=("$1")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/git-subrepo-0.4.3/lib/git-subrepo.d/help-functions.bash 
new/git-subrepo-0.4.5/lib/git-subrepo.d/help-functions.bash
--- old/git-subrepo-0.4.3/lib/git-subrepo.d/help-functions.bash 2020-11-21 
21:41:56.000000000 +0100
+++ new/git-subrepo-0.4.5/lib/git-subrepo.d/help-functions.bash 2022-09-23 
05:38:10.000000000 +0200
@@ -8,14 +8,14 @@
     cat <<'...'
 branch               branch <subdir>|--all [-f] [-F]
 clean                clean <subdir>|--all|--ALL [-f]
-clone                clone <repository> [<subdir>] [-b <branch>] [-f] [-m 
<msg>] [-e] [--method <merge|rebase>]
-commit               commit <subdir> [<subrepo-ref>] [-m <msg>] [-e] [-f] [-F]
+clone                clone <repository> [<subdir>] [-b <branch>] [-f] [-m 
<msg>] [--file=<msg file>] [-e] [--method <merge|rebase>]
+commit               commit <subdir> [<subrepo-ref>] [-m <msg>] [--file=<msg 
file>] [-e] [-f] [-F]
 config               config <subdir> <option> [<value>] [-f]
 fetch                fetch <subdir>|--all [-r <remote>] [-b <branch>]
 help                 help [<command>|--all]
 init                 init <subdir> [-r <remote>] [-b <branch>] [--method 
<merge|rebase>]
-pull                 pull <subdir>|--all [-M|-R|-f] [-m <msg>] [-e] [-b 
<branch>] [-r <remote>] [-u]
-push                 push <subdir>|--all [<branch>] [-r <remote>] [-b 
<branch>] [-M|-R] [-u] [-f] [-s] [-N]
+pull                 pull <subdir>|--all [-M|-R|-f] [-m <msg>] [--file=<msg 
file>] [-e] [-b <branch>] [-r <remote>] [-u]
+push                 push <subdir>|--all [<branch>] [-m msg] [--file=<msg 
file>] [-r <remote>] [-b <branch>] [-M|-R] [-u] [-f] [-s] [-N]
 status               status [<subdir>|--all|--ALL] [-F] [-q|-v]
 upgrade              upgrade
 version              version [-q|-v]
@@ -71,7 +71,7 @@
 help:clone() {
     cat <<'...'
 
-  Usage: git subrepo clone <repository> [<subdir>] [-b <branch>] [-f] [-m 
<msg>] [-e] [--method <merge|rebase>]
+  Usage: git subrepo clone <repository> [<subdir>] [-b <branch>] [-f] [-m 
<msg>] [--file=<msg file>] [-e] [--method <merge|rebase>]
 
 
   Add a repository as a subrepo in a subdir of your repository.
@@ -94,15 +94,15 @@
   The `--method` option will decide how the join process between branches are
    performed. The default option is merge.
 
-  The `clone` command accepts the `--branch=` `--edit`, `--force` and
-  `--message=` options.
+  The `clone` command accepts the `--branch=` `--edit`, `--file`, `--force`
+  and `--message=` options.
 ...
 }
 
 help:commit() {
     cat <<'...'
 
-  Usage: git subrepo commit <subdir> [<subrepo-ref>] [-m <msg>] [-e] [-f] [-F]
+  Usage: git subrepo commit <subdir> [<subrepo-ref>] [-m <msg>] [--file=<msg 
file>] [-e] [-f] [-F]
 
 
   Add subrepo branch to current history as a single commit.
@@ -116,8 +116,8 @@
   branch history. That way the same branch can push upstream. Use the
   `--force` option to commit anyway.
 
-  The `commit` command accepts the `--edit`, `--fetch`, `--force` and
-  `--message=` options.
+  The `commit` command accepts the `--edit`, `--fetch`, `--file`, `--force`
+  and `--message=` options.
 ...
 }
 
@@ -189,7 +189,7 @@
   If you specify the `--remote` (and optionally the `--branch`) option, the
   values will be added to the `<subdir>/.gitrepo` file. The `--remote` option
   is the upstream URL, and the `--branch` option is the upstream branch to push
-  to. These values will be needed to do a `git subrepo push` command, but they
+  to. These values will be needed to do a `git subrepo push` command, but they
   can be provided later on the `push` command (and saved to `<subdir>/.gitrepo`
   if you also specify the `--update` option).
 
@@ -206,7 +206,7 @@
 help:pull() {
     cat <<'...'
 
-  Usage: git subrepo pull <subdir>|--all [-M|-R|-f] [-m <msg>] [-e] [-b 
<branch>] [-r <remote>] [-u]
+  Usage: git subrepo pull <subdir>|--all [-M|-R|-f] [-m <msg>] [--file=<msg 
file>] [-e] [-b <branch>] [-r <remote>] [-u]
 
 
   Update the subrepo subdir with the latest upstream changes.
@@ -252,15 +252,15 @@
 
   The set of commands used above are described in detail below.
 
-  The `pull` command accepts the `--all`, `--branch=`, `--edit`, `--force`,
-  `--message=`, `--remote=` and `--update` options.
+  The `pull` command accepts the `--all`, `--branch=`, `--edit`, `--file`,
+  `--force`, `--message=`, `--remote=` and `--update` options.
 ...
 }
 
 help:push() {
     cat <<'...'
 
-  Usage: git subrepo push <subdir>|--all [<branch>] [-r <remote>] [-b 
<branch>] [-M|-R] [-u] [-f] [-s] [-N]
+  Usage: git subrepo push <subdir>|--all [<branch>] [-m msg] [--file=<msg 
file>] [-r <remote>] [-b <branch>] [-M|-R] [-u] [-f] [-s] [-N]
 
 
   Push a properly merged subrepo branch back upstream.
@@ -285,8 +285,9 @@
   discouraged. Only use this option if you fully understand it. (The `--force`
   option will NOT check for a proper merge. ANY branch will be force pushed!)
 
-  The `push` command accepts the `--all`, `--branch=`, `--dry-run`, `--force`,
-  `--merge`, `--rebase`, `--remote=`, `--squash` and `--update` options.
+  The `push` command accepts the `--all`, `--branch=`, `--dry-run`, `--file`,
+  `--force`, `--merge`, `--message`, `--rebase`, `--remote=`, `--squash` and
+  `--update` options.
 ...
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-subrepo-0.4.3/man/man1/git-subrepo.1 
new/git-subrepo-0.4.5/man/man1/git-subrepo.1
--- old/git-subrepo-0.4.3/man/man1/git-subrepo.1        2020-11-21 
21:41:56.000000000 +0100
+++ new/git-subrepo-0.4.5/man/man1/git-subrepo.1        2022-09-23 
05:38:10.000000000 +0200
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
+.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -71,7 +71,7 @@
 .\" ========================================================================
 .\"
 .IX Title "STDIN 1"
-.TH STDIN 1 "November 2020" "Generated by Swim v0.1.48" "Git Submodule 
Alternative"
+.TH STDIN 1 "August 2022" "Generated by Swim v0.1.48" "Git Submodule 
Alternative"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -186,9 +186,9 @@
 .PP
 Please note that the commands are \fInot\fR exact equivalents, and do not take
 all the same arguments. Keep reading…
-.ie n .IP """git subrepo clone <repository> [<subdir>] [\-b <branch>] [\-f] 
[\-m <msg>] [\-e] [\-\-method <merge|rebase>]""" 4
-.el .IP "\f(CWgit subrepo clone <repository> [<subdir>] [\-b <branch>] [\-f] 
[\-m <msg>] [\-e] [\-\-method <merge|rebase>]\fR" 4
-.IX Item "git subrepo clone <repository> [<subdir>] [-b <branch>] [-f] [-m 
<msg>] [-e] [--method <merge|rebase>]"
+.ie n .IP """git subrepo clone <repository> [<subdir>] [\-b <branch>] [\-f] 
[\-m <msg>] [\-\-file=<msg file>] [\-e] [\-\-method <merge|rebase>]""" 4
+.el .IP "\f(CWgit subrepo clone <repository> [<subdir>] [\-b <branch>] [\-f] 
[\-m <msg>] [\-\-file=<msg file>] [\-e] [\-\-method <merge|rebase>]\fR" 4
+.IX Item "git subrepo clone <repository> [<subdir>] [-b <branch>] [-f] [-m 
<msg>] [--file=<msg file>] [-e] [--method <merge|rebase>]"
 Add a repository as a subrepo in a subdir of your repository.
 .Sp
 This is similar in feel to \f(CW\*(C`git clone\*(C'\fR. You just specify the 
remote repo url,
@@ -209,8 +209,8 @@
 The \f(CW\*(C`\-\-method\*(C'\fR option will decide how the join process 
between branches are
 performed. The default option is merge.
 .Sp
-The \f(CW\*(C`clone\*(C'\fR command accepts the \f(CW\*(C`\-\-branch=\*(C'\fR 
\f(CW\*(C`\-\-edit\*(C'\fR, \f(CW\*(C`\-\-force\*(C'\fR and \f(CW\*(C`\-\-
-message=\*(C'\fR options.
+The \f(CW\*(C`clone\*(C'\fR command accepts the \f(CW\*(C`\-\-branch=\*(C'\fR 
\f(CW\*(C`\-\-edit\*(C'\fR, \f(CW\*(C`\-\-file\*(C'\fR, 
\f(CW\*(C`\-\-force\*(C'\fR
+and \f(CW\*(C`\-\-message=\*(C'\fR options.
 .ie n .IP """git subrepo init <subdir> [\-r <remote>] [\-b <branch>] 
[\-\-method <merge|rebase>]""" 4
 .el .IP "\f(CWgit subrepo init <subdir> [\-r <remote>] [\-b <branch>] 
[\-\-method <merge|rebase>]\fR" 4
 .IX Item "git subrepo init <subdir> [-r <remote>] [-b <branch>] [--method 
<merge|rebase>]"
@@ -219,13 +219,13 @@
 If you want to expose a subdirectory of your project as a published subrepo,
 this command will do that. It will split out the content of a normal
 subdirectory into a branch and start tracking it as a subrepo. Afterwards your
-original repo will look exactly the same except that there will be a 
\f(CW\*(C`<subdir>/.gitrepo\*(C'\fR file.
+original repo will look exactly the same except that there will be a 
\f(CW\*(C`<<subdir\*(C'\fR/.gitrepo >> file.
 .Sp
 If you specify the \f(CW\*(C`\-\-remote\*(C'\fR (and optionally the 
\f(CW\*(C`\-\-branch\*(C'\fR) option, the
 values will be added to the \f(CW\*(C`<subdir>/.gitrepo\*(C'\fR file. The 
\f(CW\*(C`\-\-remote\*(C'\fR
 option is the upstream \s-1URL,\s0 and the \f(CW\*(C`\-\-branch\*(C'\fR option 
is the upstream branch
 to push to. These values will be needed to do a \f(CW\*(C`git subrepo 
push\*(C'\fR command,
-but they can be provided later on the \f(CW\*(C`push\*(C'\fR command (and 
saved to \f(CW\*(C`<subdir>/.gitrepo\*(C'\fR if you also specify the 
\f(CW\*(C`\-\-update\*(C'\fR option).
+but they can be provided later on the \f(CW\*(C`push\*(C'\fR command (and 
saved to \f(CW\*(C`<<subdir\*(C'\fR/.gitrepo >> if you also specify the 
\f(CW\*(C`\-\-update\*(C'\fR option).
 .Sp
 Note: You will need to create the empty upstream repo and push to it on your
       own, using \f(CW\*(C`git subrepo push <subdir>\*(C'\fR.
@@ -234,9 +234,9 @@
 performed. The default option is merge.
 .Sp
 The \f(CW\*(C`init\*(C'\fR command accepts the \f(CW\*(C`\-\-branch=\*(C'\fR 
and \f(CW\*(C`\-\-remote=\*(C'\fR options.
-.ie n .IP """git subrepo pull <subdir>|\-\-all [\-M|\-R|\-f] [\-m <msg>] [\-e] 
[\-b <branch>] [\-r <remote>] [\-u]""" 4
-.el .IP "\f(CWgit subrepo pull <subdir>|\-\-all [\-M|\-R|\-f] [\-m <msg>] 
[\-e] [\-b <branch>] [\-r <remote>] [\-u]\fR" 4
-.IX Item "git subrepo pull <subdir>|--all [-M|-R|-f] [-m <msg>] [-e] [-b 
<branch>] [-r <remote>] [-u]"
+.ie n .IP """git subrepo pull <subdir>|\-\-all [\-M|\-R|\-f] [\-m <msg>] 
[\-\-file=<msg file>] [\-e] [\-b <branch>] [\-r <remote>] [\-u]""" 4
+.el .IP "\f(CWgit subrepo pull <subdir>|\-\-all [\-M|\-R|\-f] [\-m <msg>] 
[\-\-file=<msg file>] [\-e] [\-b <branch>] [\-r <remote>] [\-u]\fR" 4
+.IX Item "git subrepo pull <subdir>|--all [-M|-R|-f] [-m <msg>] [--file=<msg 
file>] [-e] [-b <branch>] [-r <remote>] [-u]"
 Update the subrepo subdir with the latest upstream changes.
 .Sp
 The \f(CW\*(C`pull\*(C'\fR command fetches the latest content from the remote 
branch pointed
@@ -284,11 +284,11 @@
 .Sp
 The set of commands used above are described in detail below.
 .Sp
-The \f(CW\*(C`pull\*(C'\fR command accepts the \f(CW\*(C`\-\-all\*(C'\fR, 
\f(CW\*(C`\-\-branch=\*(C'\fR, \f(CW\*(C`\-\-edit\*(C'\fR, 
\f(CW\*(C`\-\-force\*(C'\fR,
-\&\f(CW\*(C`\-\-message=\*(C'\fR, \f(CW\*(C`\-\-remote=\*(C'\fR and 
\f(CW\*(C`\-\-update\*(C'\fR options.
-.ie n .IP """git subrepo push <subdir>|\-\-all [<branch>] [\-r <remote>] [\-b 
<branch>] [\-M|\-R] [\-u] [\-f] [\-s] [\-N]""" 4
-.el .IP "\f(CWgit subrepo push <subdir>|\-\-all [<branch>] [\-r <remote>] [\-b 
<branch>] [\-M|\-R] [\-u] [\-f] [\-s] [\-N]\fR" 4
-.IX Item "git subrepo push <subdir>|--all [<branch>] [-r <remote>] [-b 
<branch>] [-M|-R] [-u] [-f] [-s] [-N]"
+The \f(CW\*(C`pull\*(C'\fR command accepts the \f(CW\*(C`\-\-all\*(C'\fR, 
\f(CW\*(C`\-\-branch=\*(C'\fR, \f(CW\*(C`\-\-edit\*(C'\fR, 
\f(CW\*(C`\-\-file\*(C'\fR,
+\&\f(CW\*(C`\-\-force\*(C'\fR, \f(CW\*(C`\-\-message=\*(C'\fR, 
\f(CW\*(C`\-\-remote=\*(C'\fR and \f(CW\*(C`\-\-update\*(C'\fR options.
+.ie n .IP """git subrepo push <subdir>|\-\-all [<branch>] [\-m msg] 
[\-\-file=<msg file>] [\-r <remote>] [\-b <branch>] [\-M|\-R] [\-u] [\-f] [\-s] 
[\-N]""" 4
+.el .IP "\f(CWgit subrepo push <subdir>|\-\-all [<branch>] [\-m msg] 
[\-\-file=<msg file>] [\-r <remote>] [\-b <branch>] [\-M|\-R] [\-u] [\-f] [\-s] 
[\-N]\fR" 4
+.IX Item "git subrepo push <subdir>|--all [<branch>] [-m msg] [--file=<msg 
file>] [-r <remote>] [-b <branch>] [-M|-R] [-u] [-f] [-s] [-N]"
 Push a properly merged subrepo branch back upstream.
 .Sp
 This command takes the subrepo branch from a successful pull command and
@@ -311,9 +311,7 @@
 discouraged. Only use this option if you fully understand it. (The 
\f(CW\*(C`\-\-force\*(C'\fR
 option will \s-1NOT\s0 check for a proper merge. \s-1ANY\s0 branch will be 
force pushed!)
 .Sp
-The \f(CW\*(C`push\*(C'\fR command accepts the \f(CW\*(C`\-\-all\*(C'\fR, 
\f(CW\*(C`\-\-branch=\*(C'\fR, \f(CW\*(C`\-\-dry\-run\*(C'\fR, \f(CW\*(C`\-\-
-force\*(C'\fR, \f(CW\*(C`\-\-merge\*(C'\fR, \f(CW\*(C`\-\-rebase\*(C'\fR, 
\f(CW\*(C`\-\-remote=\*(C'\fR, \f(CW\*(C`\-\-squash\*(C'\fR and \f(CW\*(C`\-\-
-update\*(C'\fR options.
+The \f(CW\*(C`push\*(C'\fR command accepts the \f(CW\*(C`\-\-all\*(C'\fR, 
\f(CW\*(C`\-\-branch=\*(C'\fR, \f(CW\*(C`\-\-dry\-run\*(C'\fR, 
\f(CW\*(C`\-\-file\*(C'\fR, \f(CW\*(C`\-\-force\*(C'\fR, 
\f(CW\*(C`\-\-merge\*(C'\fR, \f(CW\*(C`\-\-message\*(C'\fR, 
\f(CW\*(C`\-\-rebase\*(C'\fR, \f(CW\*(C`\-\-remote=\*(C'\fR, 
\f(CW\*(C`\-\-squash\*(C'\fR and \f(CW\*(C`\-\-update\*(C'\fR options.
 .ie n .IP """git subrepo fetch <subdir>|\-\-all [\-r <remote>] [\-b 
<branch>]""" 4
 .el .IP "\f(CWgit subrepo fetch <subdir>|\-\-all [\-r <remote>] [\-b 
<branch>]\fR" 4
 .IX Item "git subrepo fetch <subdir>|--all [-r <remote>] [-b <branch>]"
@@ -324,8 +322,7 @@
 called \f(CW\*(C`subrepo/<subdir>\*(C'\fR. These are temporary and you can 
easily remove
 them with the subrepo \f(CW\*(C`clean\*(C'\fR command.
 .Sp
-The \f(CW\*(C`fetch\*(C'\fR command accepts the \f(CW\*(C`\-\-all\*(C'\fR, 
\f(CW\*(C`\-\-branch=\*(C'\fR and \f(CW\*(C`\-\-
-remote=\*(C'\fR options.
+The \f(CW\*(C`fetch\*(C'\fR command accepts the \f(CW\*(C`\-\-all\*(C'\fR, 
\f(CW\*(C`\-\-branch=\*(C'\fR and \f(CW\*(C`\-\-remote=\*(C'\fR options.
 .ie n .IP """git subrepo branch <subdir>|\-\-all [\-f] [\-F]""" 4
 .el .IP "\f(CWgit subrepo branch <subdir>|\-\-all [\-f] [\-F]\fR" 4
 .IX Item "git subrepo branch <subdir>|--all [-f] [-F]"
@@ -339,13 +336,12 @@
 Use the \f(CW\*(C`\-\-force\*(C'\fR option to write over an existing 
\f(CW\*(C`subrepo/<subdir>\*(C'\fR branch.
 .Sp
 The \f(CW\*(C`branch\*(C'\fR command accepts the \f(CW\*(C`\-\-all\*(C'\fR, 
\f(CW\*(C`\-\-fetch\*(C'\fR and \f(CW\*(C`\-\-force\*(C'\fR options.
-.ie n .IP """git subrepo commit <subdir> [<subrepo\-ref>] [\-m <msg>] [\-e] 
[\-f] [\-F]""" 4
-.el .IP "\f(CWgit subrepo commit <subdir> [<subrepo\-ref>] [\-m <msg>] [\-e] 
[\-f] [\-F]\fR" 4
-.IX Item "git subrepo commit <subdir> [<subrepo-ref>] [-m <msg>] [-e] [-f] 
[-F]"
+.ie n .IP """git subrepo commit <subdir> [<subrepo\-ref>] [\-m <msg>] 
[\-\-file=<msg file>] [\-e] [\-f] [\-F]""" 4
+.el .IP "\f(CWgit subrepo commit <subdir> [<subrepo\-ref>] [\-m <msg>] 
[\-\-file=<msg file>] [\-e] [\-f] [\-F]\fR" 4
+.IX Item "git subrepo commit <subdir> [<subrepo-ref>] [-m <msg>] [--file=<msg 
file>] [-e] [-f] [-F]"
 Add subrepo branch to current history as a single commit.
 .Sp
-This command is generally used after a hand-merge. You have done a 
\f(CW\*(C`subrepo
-branch\*(C'\fR and merged (rebased) it with the upstream. This command takes 
the \s-1HEAD\s0
+This command is generally used after a hand-merge. You have done a 
\f(CW\*(C`subrepobranch\*(C'\fR and merged (rebased) it with the upstream. This 
command takes the \s-1HEAD\s0
 of that branch, puts its content into the subrepo subdir and adds a new commit
 for it to the top of your mainline history.
 .Sp
@@ -353,13 +349,12 @@
 branch history. That way the same branch can push upstream. Use the 
\f(CW\*(C`\-\-force\*(C'\fR
 option to commit anyway.
 .Sp
-The \f(CW\*(C`commit\*(C'\fR command accepts the \f(CW\*(C`\-\-edit\*(C'\fR, 
\f(CW\*(C`\-\-fetch\*(C'\fR, \f(CW\*(C`\-\-force\*(C'\fR and \f(CW\*(C`\-\-
-message=\*(C'\fR options.
+The \f(CW\*(C`commit\*(C'\fR command accepts the \f(CW\*(C`\-\-edit\*(C'\fR, 
\f(CW\*(C`\-\-fetch\*(C'\fR, \f(CW\*(C`\-\-file\*(C'\fR, 
\f(CW\*(C`\-\-force\*(C'\fR
+and \f(CW\*(C`\-\-message=\*(C'\fR options.
 .ie n .IP """git subrepo status [<subdir>|\-\-all|\-\-ALL] [\-F] [\-q|\-v]""" 4
 .el .IP "\f(CWgit subrepo status [<subdir>|\-\-all|\-\-ALL] [\-F] 
[\-q|\-v]\fR" 4
 .IX Item "git subrepo status [<subdir>|--all|--ALL] [-F] [-q|-v]"
-Get the status of a subrepo. Uses the \f(CW\*(C`\-\-all\*(C'\fR option by 
default. If the \f(CW\*(C`\-\-
-quiet\*(C'\fR flag is used, just print the subrepo names, one per line.
+Get the status of a subrepo. Uses the \f(CW\*(C`\-\-all\*(C'\fR option by 
default. If the \f(CW\*(C`\-\-quiet\*(C'\fR flag is used, just print the 
subrepo names, one per line.
 .Sp
 The \f(CW\*(C`\-\-verbose\*(C'\fR option will show all the recent local and 
upstream commits.
 .Sp
@@ -475,6 +470,10 @@
 .el .IP "\f(CW\-\-fetch\fR (\f(CW\-F\fR)" 4
 .IX Item "--fetch (-F)"
 Use this option to fetch the upstream commits, before running the command.
+.ie n .IP """\-\-file=<commit msg file>""" 4
+.el .IP "\f(CW\-\-file=<commit msg file>\fR" 4
+.IX Item "--file=<commit msg file>"
+Supply your own commit message from a file
 .ie n .IP """\-\-force"" (""\-f"")" 4
 .el .IP "\f(CW\-\-force\fR (\f(CW\-f\fR)" 4
 .IX Item "--force (-f)"
@@ -537,8 +536,7 @@
 .ie n .IP """GIT_SUBREPO_ROOT""" 4
 .el .IP "\f(CWGIT_SUBREPO_ROOT\fR" 4
 .IX Item "GIT_SUBREPO_ROOT"
-This is set by the \f(CW\*(C`.rc\*(C'\fR file, if you use that method to 
install / enable \f(CW\*(C`git\-
-subrepo\*(C'\fR. It contains the path of the \f(CW\*(C`git\-subrepo\*(C'\fR 
repository.
+This is set by the \f(CW\*(C`.rc\*(C'\fR file, if you use that method to 
install / enable \f(CW\*(C`git\-subrepo\*(C'\fR. It contains the path of the 
\f(CW\*(C`git\-subrepo\*(C'\fR repository.
 .ie n .IP """GIT_SUBREPO_RUNNING""" 4
 .el .IP "\f(CWGIT_SUBREPO_RUNNING\fR" 4
 .IX Item "GIT_SUBREPO_RUNNING"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-subrepo-0.4.3/share/enable-completion.sh 
new/git-subrepo-0.4.5/share/enable-completion.sh
--- old/git-subrepo-0.4.3/share/enable-completion.sh    2020-11-21 
21:41:56.000000000 +0100
+++ new/git-subrepo-0.4.5/share/enable-completion.sh    2022-09-23 
05:38:10.000000000 +0200
@@ -1,7 +1,7 @@
 # shellcheck shell=bash
 
 # Enable git-subrepo completion facilities
-if [[ ${BASH_VERSION-} ]]; then
+if [[ -n ${BASH_VERSION-} ]]; then
   # Bash
   if [[ $(type -t __gitcomp 2> /dev/null) != function ]]; then
     # The standard Git completion script for Bash does not seem to be
@@ -40,7 +40,7 @@
   fi
   # Load our Bash completion facilities.
   source "$GIT_SUBREPO_ROOT/share/completion.bash"
-elif [[ ${ZSH_VERSION-} ]]; then
+elif [[ -n ${ZSH_VERSION-} ]]; then
   # Zsh
   #
   # Prepend to `fpath` the path of the directory containing our zsh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-subrepo-0.4.3/test/issue29.t 
new/git-subrepo-0.4.5/test/issue29.t
--- old/git-subrepo-0.4.3/test/issue29.t        2020-11-21 21:41:56.000000000 
+0100
+++ new/git-subrepo-0.4.5/test/issue29.t        2022-09-23 05:38:10.000000000 
+0200
@@ -40,7 +40,7 @@
   touch main1
   git add main1
   git commit -m "Initial main1"
-  git subrepo clone ../share share -b master
+  git subrepo clone ../share share -b "$DEFAULTBRANCH"
 ) > /dev/null
 
 # `subrepo clone` the share repo into main2:
@@ -49,7 +49,7 @@
   touch main2
   git add main2
   git commit -m "Initial main2"
-  git subrepo clone ../share share -b master
+  git subrepo clone ../share share -b "$DEFAULTBRANCH"
 ) > /dev/null
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-subrepo-0.4.3/test/issue95.t 
new/git-subrepo-0.4.5/test/issue95.t
--- old/git-subrepo-0.4.3/test/issue95.t        2020-11-21 21:41:56.000000000 
+0100
+++ new/git-subrepo-0.4.5/test/issue95.t        2022-09-23 05:38:10.000000000 
+0200
@@ -46,7 +46,7 @@
         touch feature
         git add feature
         git commit -m "feature added"
-        git checkout master
+        git checkout "$DEFAULTBRANCH"
     ) &> /dev/null
 
     # Commit directly to subrepo
@@ -89,7 +89,7 @@
             cd host
             git subrepo pull sub
     )" \
-        "Subrepo 'sub' pulled from '../sub' (master)."
+        "Subrepo 'sub' pulled from '../sub' ($DEFAULTBRANCH)."
 
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-subrepo-0.4.3/test/issue96.t 
new/git-subrepo-0.4.5/test/issue96.t
--- old/git-subrepo-0.4.3/test/issue96.t        2020-11-21 21:41:56.000000000 
+0100
+++ new/git-subrepo-0.4.5/test/issue96.t        2022-09-23 05:38:10.000000000 
+0200
@@ -81,15 +81,15 @@
             cd host
             git subrepo pull sub
     )" \
-        "Subrepo 'sub' pulled from '../sub' (master)."
+        "Subrepo 'sub' pulled from '../sub' ($DEFAULTBRANCH)."
 
     # Push subrepo changes
     # expected: successful push without conflicts
     is "$(
             cd host
-            git subrepo push sub -b master -u
+            git subrepo push sub -b "$DEFAULTBRANCH" -u
     )" \
-       "Subrepo 'sub' pushed to '../sub' (master)."
+       "Subrepo 'sub' pushed to '../sub' ($DEFAULTBRANCH)."
 
 done_testing 2
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-subrepo-0.4.3/test/setup 
new/git-subrepo-0.4.5/test/setup
--- old/git-subrepo-0.4.3/test/setup    2020-11-21 21:41:56.000000000 +0100
+++ new/git-subrepo-0.4.5/test/setup    2022-09-23 05:38:10.000000000 +0200
@@ -33,6 +33,10 @@
 
 cp -r test/repo/{foo,bar,init} "$UPSTREAM/"
 
+DEFAULTBRANCH=$( git config --global --get init.defaultbranch || true )
+[[ -z $DEFAULTBRANCH ]] && DEFAULTBRANCH="master"
+export DEFAULTBRANCH
+
 ###
 # Test helper functions:
 ###
@@ -68,7 +72,7 @@
   local file
   for file in "$@"; do
     echo "new file $file" > "$file"
-    git add "$file"
+    git add --force "$file"
   done
   git commit --quiet -m "add new file: $file" &> /dev/null
 }
@@ -151,7 +155,7 @@
 ; DO NOT EDIT (unless you know what you are doing)
 ;
 ; This subdirectory is a git \"subrepo\", and this file is maintained by the
-; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
+; git-subrepo command. See https://github.com/ingydotnet/git-subrepo#readme
 ;" \
     'Comment header block is correct'
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/git-subrepo-0.4.3/test/zsh.t 
new/git-subrepo-0.4.5/test/zsh.t
--- old/git-subrepo-0.4.3/test/zsh.t    1970-01-01 01:00:00.000000000 +0100
+++ new/git-subrepo-0.4.5/test/zsh.t    2022-09-23 05:38:10.000000000 +0200
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+
+set -e
+
+source test/setup
+
+use Test::More
+
+if ! command -v docker >/dev/null; then
+  plan skip_all "The 'docker' utility is not installed"
+fi
+
+for zsh_version in 5.8 5.6 5.0.1 4.3.11; do
+  error=$(
+    docker run --rm -it \
+      --volume="$PWD:/git-subrepo" \
+      --entrypoint='' \
+        "zshusers/zsh:$zsh_version" \
+        zsh -c 'source /git-subrepo/.rc 2>&1'
+  ) || true
+
+  is "$error" "" "'source.rc' works for zsh-$zsh_version"
+done
+
+done_testing
+
+# vim: set ft=sh:

Reply via email to