]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
configure initial git repo push -u target
authorElan Ruusamäe <glen@delfi.ee>
Sat, 7 Nov 2015 15:28:31 +0000 (17:28 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Sat, 7 Nov 2015 15:28:31 +0000 (17:28 +0200)
builder.sh

index c5bac9370bbdb532838b2c6b9ab9371681cf05ff..cada6196cf83cf530c6211b390549569e48bbcc4 100755 (executable)
@@ -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() {
This page took 0.048447 seconds and 4 git commands to generate.