From: Elan Ruusamäe Date: Sat, 7 Nov 2015 15:28:31 +0000 (+0200) Subject: configure initial git repo push -u target X-Git-Tag: auto/th/rpm-build-tools-4.8-2~1 X-Git-Url: https://git.pld-linux.org/?a=commitdiff_plain;h=d8dbe3005c3ba5e6d8646cb8477d66dc23cdfe59;p=packages%2Frpm-build-tools.git configure initial git repo push -u target --- diff --git a/builder.sh b/builder.sh index c5bac93..cada619 100755 --- a/builder.sh +++ b/builder.sh @@ -918,10 +918,17 @@ create_git_repo() { fi [ -d "$ASSUMED_NAME/.git" ] || NEW_REPO=yes ssh $GIT_PUSH create ${ASSUMED_NAME} || Exit_error err_cvs_add_failed + ( + set -e git init - git remote add $REMOTE_PLD ${GIT_SERVER}/${PACKAGES_DIR}/${ASSUMED_NAME}.git && \ - git remote set-url --push $REMOTE_PLD ssh://${GIT_PUSH}/${PACKAGES_DIR}/${ASSUMED_NAME} \ - || Exit_error err_remote_problem $REMOTE_PLD + git remote add $REMOTE_PLD ${GIT_SERVER}/${PACKAGES_DIR}/${ASSUMED_NAME}.git + git remote set-url --push $REMOTE_PLD ssh://${GIT_PUSH}/${PACKAGES_DIR}/${ASSUMED_NAME} + + git config --local push.default current + git config --local branch.master.remote $REMOTE_PLD + git config --local branch.master.merge refs/heads/master + ) + test $? = 0 || Exit_error err_remote_problem $REMOTE_PLD } get_spec() {