mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2024-11-22 02:05:22 +08:00
Support installing repo from URL with non-master branch
Somewhat related to #905 and #685
This commit is contained in:
parent
55da5f7b6f
commit
90f875e02d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user