Skip to content

Commit 9a74c1a

Browse files
committed
bug fix
1 parent c3e8927 commit 9a74c1a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CI_Git.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,9 +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-
$repo = new self($repo_path, true, !! is_string($source));
109+
$repo = new self($repo_path, true, false);
110110
if (is_string($source))
111111
$repo->clone_from($source);
112+
else $repo->run('init');
112113
return $repo;
113114
}
114115
}

Git.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,10 @@ 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, !! is_string($source));
102+
$repo = new self($repo_path, true, false);
103103
if (is_string($source))
104104
$repo->clone_from($source);
105+
else $repo->run('init');
105106
return $repo;
106107
}
107108
}

0 commit comments

Comments
 (0)