From 93aeb007f8886ff045fc010ab9f45c0473f03c04 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 3 Apr 2009 22:28:12 +0200 Subject: pkg: vcs_upgrade: Only fail on non-master branch when not using origin --- bin/pkg | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/pkg b/bin/pkg index d96698e..c4fb45e 100755 --- a/bin/pkg +++ b/bin/pkg @@ -246,17 +246,17 @@ function vcs_upgrade { 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 - } if ((GIT_USE_ORIGIN)) { # the package might be newly created and not have an origin yet vcs_fix_origin git pull } else { + 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 } } -- cgit v1.2.3