Skip to content

Commit 57de7d6

Browse files
committed
Support older versions of git for subrep init
Older versions of git require git config --get instead of git config get. Newer versions support both methods so use the most widely supported. Fixes #631
1 parent 55a050a commit 57de7d6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/git-subrepo

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ command:clone() {
211211
# `git subrepo init <subdir>` command:
212212
command:init() {
213213
command-setup +subdir
214-
local default_branch=$(git config get --default=master init.defaultbranch)
214+
local default_branch=
215+
default_branch=$(git config --get --default=master init.defaultbranch)
215216
local remote=${subrepo_remote:=none}
216217
local branch=${subrepo_branch:=$default_branch}
217218

0 commit comments

Comments
 (0)