diff --git a/Utils/Git/NullCommit.php b/Utils/Git/NullCommit.php new file mode 100644 index 000000000..60a341b0b --- /dev/null +++ b/Utils/Git/NullCommit.php @@ -0,0 +1,27 @@ +setAuthor(new Author(trim($author[0] ?? ''), rtrim($author[1] ?? '', '>'))); @@ -914,8 +912,7 @@ class Repository $lines = $this->run('log -n ' . $limit); if (empty($lines)) { - // todo: return nullcommit - return new Commit(); + return new NullCommit(); } \preg_match('/[0-9ABCDEFabcdef]{40}/', $lines[0], $matches);