diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-01-20 20:57:11 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-01-20 20:57:11 -0500 |
commit | ad942134c5849686a385da458ea4f5d7a3752000 (patch) | |
tree | 57d39740d66f1128382c64b0d14a54594fc02ad0 /etc/phpshellsessions | |
parent | 2ac39ce3d7f19a8f267f5c1d03636986a0b19e47 (diff) | |
download | pfsense-ad942134c5849686a385da458ea4f5d7a3752000.zip pfsense-ad942134c5849686a385da458ea4f5d7a3752000.tar.gz |
Use fetch and merge on subsequent checkouts
Diffstat (limited to 'etc/phpshellsessions')
-rw-r--r-- | etc/phpshellsessions/cvssync | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/phpshellsessions/cvssync b/etc/phpshellsessions/cvssync index 8617a5e..e56d8fb 100644 --- a/etc/phpshellsessions/cvssync +++ b/etc/phpshellsessions/cvssync @@ -102,6 +102,7 @@ exec("mkdir -p /root/pfsense/$branch"); // Git 'er done! if(is_dir("$CODIR/pfSenseGITREPO")) { exec("cd $CODIR/pfSenseGITREPO && git fetch"); + exec("cd $CODIR/pfSenseGITREPO && git merge $BRANCHTAG"); } else { exec("cd $CODIR && git clone $GIT_REPO pfSenseGITREPO"); } @@ -110,10 +111,11 @@ if($branch == "master") { exec("cd $CODIR/pfSenseGITREPO && git checkout master"); } else { $current_branch=`git branch | grep $BRANCHTAG`; - if($current_branch == "") - exec("cd $CODIR/pfSenseGITREPO && git fetch && git checkout -b $BRANCHTAG origin/$BRANCHTAG"); - else + if($current_branch == "") { + exec("cd $CODIR/pfSenseGITREPO && git checkout -b $BRANCHTAG origin/$BRANCHTAG"); + } else { exec("cd $CODIR/pfSenseGITREPO && git checkout $BRANCHTAG"); + } } exec("mkdir -p /tmp/lighttpd/cache/compress/"); |