Support installing repo from URL with non-master branch

Somewhat related to #905 and #685
This commit is contained in:
Manu [tennox] 2022-06-20 17:38:56 +01:00 committed by Pablo Santiago Blum de Aguiar
parent 55da5f7b6f
commit 90f875e02d

View File

@ -1,12 +1,12 @@
function omf.repo.pull -a repo_dir branch
if test -z "$branch"
set branch "master"
end
function __omf.repo.git -V repo_dir
command git -C "$repo_dir" $argv
end
if test -z "$branch"
set branch (__omf.repo.git symbolic-ref -q --short HEAD)
end
set -l remote origin
if test (__omf.repo.git config --get remote.upstream.url)
set remote upstream