Skip to content

Commit c3e8927

Browse files
committed
bug fix
1 parent 6145ad3 commit c3e8927

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

CI_Git.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,10 @@ public static function &create_new($repo_path, $source = null) {
106106
if (is_dir($repo_path) && file_exists($repo_path."/.git") && is_dir($repo_path."/.git")) {
107107
throw new Exception('"$repo_path" is already a git repository');
108108
} else {
109-
if (is_string($source)) {
110-
$repo = new self($repo_path, true);
109+
$repo = new self($repo_path, true, !! is_string($source));
110+
if (is_string($source))
111111
$repo->clone_from($source);
112-
return $repo;
113-
} else {
114-
return new self($repo_path, true);
115-
}
112+
return $repo;
116113
}
117114
}
118115

Git.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public static function &create_new($repo_path, $source = null) {
9999
if (is_dir($repo_path) && file_exists($repo_path."/.git") && is_dir($repo_path."/.git")) {
100100
throw new Exception('"$repo_path" is already a git repository');
101101
} else {
102-
$repo = new self($repo_path, true, false);
102+
$repo = new self($repo_path, true, !! is_string($source));
103103
if (is_string($source))
104104
$repo->clone_from($source);
105105
return $repo;

0 commit comments

Comments
 (0)