Skip to content

Commit 1ef8d5f

Browse files
committed
Prevent crash if github information are stored as refs
Use case: https://gist.github.com/3342247
1 parent 88e4c31 commit 1ef8d5f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Gitonomy/Git/ReferenceBag.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,8 @@ protected function initialize()
366366
} elseif ($fullname === 'refs/stash') {
367367
$reference = new Stash($this->repository, $fullname, $commitHash);
368368
$this->references[$fullname] = $reference;
369+
} elseif (preg_match('#^refs/pull/(.*)$#', $fullname)) {
370+
// Do nothing here
369371
} else {
370372
throw new \RuntimeException(sprintf('Unable to parse "%s"', $fullname));
371373
}

0 commit comments

Comments
 (0)