[asterisk-scf-commits] asterisk-scf/integration/gitall.git branch "push" created.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Nov 17 09:33:54 CST 2010


branch "push" has been created
        at  977c443dfb2f3e146a7e7c4055919615bfd5f710 (commit)

- Log -----------------------------------------------------------------
commit 977c443dfb2f3e146a7e7c4055919615bfd5f710
Author: David M. Lee <dlee at digium.com>
Date:   Tue Nov 16 14:34:36 2010 -0600

    Allow seperate push and pull URL's.

diff --git a/gitall-asterisk-scf.sh b/gitall-asterisk-scf.sh
index 962a339..d4a92c1 100755
--- a/gitall-asterisk-scf.sh
+++ b/gitall-asterisk-scf.sh
@@ -26,6 +26,7 @@ EOF
 }
 
 gitdepot=`git config --get remote.origin.url | sed "s at asterisk-scf/integration/gitall@@"`
+gitdepot_push=`git config --get remote.origin.pushurl | sed "s at asterisk-scf/integration/gitall@@"`
 
 # tree should probably be set by menu prompts or command line args
 # one day
@@ -115,10 +116,16 @@ EOF
     for repo in "${repos[@]}"; do
         repoDir=$(basename ${repo})
         repoUri=${gitdepot}${tree}/${repo}
+        repoPushUri=${gitdepot_push}${tree}/${repo}
 
         if [ -d ${repoDir}/.git ]; then
             # update the origin to what is specified in repoUri
             ( cd ${repoDir} && git config remote.origin.url ${repoUri} )
+            ( cd ${repoDir} && if test ${gitdepot_push}; then
+                    git config remote.origin.pushurl ${repoPushUri};
+                else
+                    git config --unset remote.origin.pushurl
+                fi ) )
             if ( cd ${repoDir} && git rev-parse --verify @{upstream} > /dev/null 2>&1 ); then
                 echo ">> Pulling from repo ${repoUri}"
                 ( cd ${repoDir} && git pull )

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/gitall.git



More information about the asterisk-scf-commits mailing list