Allow browsing public snips
Fixed big with branch name not existing if nothing committed
This commit is contained in:
@ -22,6 +22,9 @@ class SnipServiceFactory
|
||||
$repoPath = sprintf('%s/%s', $this->snipBasePath, $snip->getId());
|
||||
if (!is_dir($repoPath)) {
|
||||
$repo = $git->init($repoPath);
|
||||
touch(sprintf('%s/.gitignore', $repoPath));
|
||||
$repo->addFile('.gitignore');
|
||||
$repo->commit('Initial commit');
|
||||
} else {
|
||||
$repo = $git->open($repoPath);
|
||||
}
|
||||
|
Reference in New Issue
Block a user