diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-03-13 07:15:36 +0100 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-03-13 07:15:36 +0100 |
commit | 8dc486f1cd95a74c6590d309abe379d8eff7848e (patch) | |
tree | b7d99ac5879c733a8f008d09caafb73d6e97042a /bin/pkg | |
parent | 6128bd5f70e26e5300013599428c7253e046d46b (diff) |
pkg: For now, only support the master branch
Diffstat (limited to 'bin/pkg')
-rwxr-xr-x | bin/pkg | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -238,7 +238,18 @@ function vcs_log { } function vcs_upgrade { - git pull + typeset IFS=$'\n' line + typeset branch + for line in $(git branch); { + [[ $line == \*\ * ]] && branch=${line#* } + } + if [[ $branch != master ]] { + warn "$1: The currently checked out branch is not master, but '$branch'" \ + "Currently, pkg can only operate on the branch master" \ + " -> skipping repo, please fix manually or report a bug" + return 1 + } + git pull $PKG_ROOT/${PWD:t} master vcs_fix_origin } @@ -257,8 +268,6 @@ function vcs_fix_origin { if [[ ! -r .git/remotes/origin && ! -r .git/refs/remotes/origin/HEAD ]] { fgrep '[remote "origin"]' .git/config &> /dev/null || git remote add origin $PKG_ROOT/${PWD:t} - git config branch.master.remote origin - git config branch.master.merge refs/heads/master } git remote update &> /dev/null } |