From d8dbe3005c3ba5e6d8646cb8477d66dc23cdfe59 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Sat, 7 Nov 2015 17:28:31 +0200 Subject: [PATCH] configure initial git repo push -u target --- builder.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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() { -- 2.44.0