From 57de7d64ddf4c61ee2063f964ca766b535f04d6a Mon Sep 17 00:00:00 2001 From: Austin Morgan Date: Sun, 8 Sep 2024 21:06:24 -0500 Subject: [PATCH] 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 --- lib/git-subrepo | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/git-subrepo b/lib/git-subrepo index 82dfb503..cfeeae92 100755 --- a/lib/git-subrepo +++ b/lib/git-subrepo @@ -211,7 +211,8 @@ command:clone() { # `git subrepo init ` command: command:init() { command-setup +subdir - local default_branch=$(git config get --default=master init.defaultbranch) + local default_branch= + default_branch=$(git config --get --default=master init.defaultbranch) local remote=${subrepo_remote:=none} local branch=${subrepo_branch:=$default_branch}