projects
/
GITManagedWebpage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8cf9a29
)
added possibility to use origin branches
author
pk910
<philipp@zoelle1.de>
Sun, 6 Oct 2013 01:23:44 +0000
(
03:23
+0200)
committer
pk910
<philipp@zoelle1.de>
Sun, 6 Oct 2013 01:23:44 +0000
(
03:23
+0200)
GITManagedWebpage.class.php
patch
|
blob
|
history
diff --git
a/GITManagedWebpage.class.php
b/GITManagedWebpage.class.php
index 3a76edcec7cca0f9722b56633d86dd92f339c5f5..5b15d8cbf32293e6209683935ce3756d0628e306 100644
(file)
--- a/
GITManagedWebpage.class.php
+++ b/
GITManagedWebpage.class.php
@@
-218,7
+218,7
@@
class GITManagedWebpage {
if($branch == $default_branch)
$dir = $this->localdir;
else
if($branch == $default_branch)
$dir = $this->localdir;
else
- $dir = $this->workdir.'branch_'.
$branch
.'/';
+ $dir = $this->workdir.'branch_'.
str_replace(array('/'), array('_'), $branch)
.'/';
if(file_exists($dir))
return $dir;
else if($create) {
if(file_exists($dir))
return $dir;
else if($create) {
@@
-290,8
+290,12
@@
class GITManagedWebpage {
if($this->loopedcall)
return;
if($this->loopedcall)
return;
- if(!$this->branchExists($branch))
- return false;
+ if(!$this->branchExists($branch)) {
+ if($this->branchExists('origin/'.$branch))
+ $branch = 'origin/'.$branch;
+ else
+ return false;
+ }
$this->setActiveBranch($branch, $remember);
if(!$this->localBranchPath($branch)) {
$this->setActiveBranch($branch, $remember);
if(!$this->localBranchPath($branch)) {