From 53d37a9893c433adbf8bf2057db8a65d5f7ef83f Mon Sep 17 00:00:00 2001 From: fdeitylink <11952260+fdeitylink@users.noreply.github.com> Date: Tue, 2 Mar 2021 16:45:36 -0500 Subject: [PATCH] packages: do not set default pkg branch to master --- pkg/omf/functions/packages/omf.packages.install.fish | 4 +--- pkg/omf/functions/repo/omf.repo.clone.fish | 6 +++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pkg/omf/functions/packages/omf.packages.install.fish b/pkg/omf/functions/packages/omf.packages.install.fish index 75ffe30..f6fafc0 100644 --- a/pkg/omf/functions/packages/omf.packages.install.fish +++ b/pkg/omf/functions/packages/omf.packages.install.fish @@ -16,12 +16,10 @@ function omf.packages.install -a name_or_url set name $name_or_url set url $props[2] set branch $props[3] - if test -z "$branch" - set branch "master" - end else set name (omf.packages.name $name_or_url) set url $name_or_url + set branch "" end if contains -- $name (omf.packages.list) diff --git a/pkg/omf/functions/repo/omf.repo.clone.fish b/pkg/omf/functions/repo/omf.repo.clone.fish index beba8d4..e795d97 100644 --- a/pkg/omf/functions/repo/omf.repo.clone.fish +++ b/pkg/omf/functions/repo/omf.repo.clone.fish @@ -1,3 +1,7 @@ function omf.repo.clone -a url branch path - command git clone --quiet $url -b $branch $path + if test -z "$branch" + command git clone --quiet $url $path + else + command git clone --quiet $url -b $branch $path + end end