From 90f875e02dbb63a7e12430ceb034206bea278c28 Mon Sep 17 00:00:00 2001 From: "Manu [tennox]" <2084639+tennox@users.noreply.github.com> Date: Mon, 20 Jun 2022 17:38:56 +0100 Subject: [PATCH] Support installing repo from URL with non-master branch Somewhat related to #905 and #685 --- pkg/omf/functions/repo/omf.repo.pull.fish | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/omf/functions/repo/omf.repo.pull.fish b/pkg/omf/functions/repo/omf.repo.pull.fish index 7564fd2..2334798 100644 --- a/pkg/omf/functions/repo/omf.repo.pull.fish +++ b/pkg/omf/functions/repo/omf.repo.pull.fish @@ -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