diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-12-29 17:58:46 +0100 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-12-29 17:58:46 +0100 |
commit | b45548b814d95164bfe11c7538784ce06d06f62f (patch) | |
tree | 4d9663d434fd28b575491a5633b341e77763fd90 /bin/pkg | |
parent | f2dd08b67798e5e47041b584c273d053fed96a3b (diff) |
bin/pkg: Try to use git fetch to avoid merging master into another branch by accident
Diffstat (limited to 'bin/pkg')
-rwxr-xr-x | bin/pkg | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -229,7 +229,16 @@ function vcs_log { } function vcs_upgrade { - git pull $PKG_ROOT/${PWD:t} master + typeset IFS=$'\n' line + typeset -i merge_ok=0 + for line in $(git branch) { + [[ $line == '* master' ]] && ok=1 + } + if ((ok)) { + git pull $PKG_ROOT/${PWD:t} master + } else { + git fetch $PKG_rOOT/${PWD:t} master + } } function vcs_push { |