barryserver-git
Barry Fixed issue with branch cloning showing -b on branch selector page 1660333 (4 years, 4 months ago)diff --git a/git.php b/git.php index 0b472aa..a5b3658 100644 --- a/git.php +++ b/git.php @@ -196,7 +196,7 @@ $FOOTER = "BarryServer Git Browser"; } else { $branch = explode("/", substr($path,1))[1]; echo " <span class=\"clone\">git clone "; - if ($branch !== $BRANCH) {echo "-b ".$branch." ";} + if ($branch !== $BRANCH && $branch !== "") {echo "-b ".$branch." ";} echo "<a href=\"git://".$_SERVER["SERVER_NAME"]."/".$repo.".git\">git://".$_SERVER["SERVER_NAME"]."/".$repo.".git</a></span><br><br>\n"; $rest = implode("/",array_slice(explode("/", substr($path,1)),2)); chdir($ORIGINAL."/".$repo.".git");