Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Gitonomy/Git/Parser/CommitParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ protected function doParse()
$this->consume('committer ');
list($this->committerName, $this->committerEmail, $this->committerDate) = $this->consumeNameEmailDate();
$this->committerDate = $this->parseDate($this->committerDate);

// will consume an GPG signed commit if there is one
$this->consumeGPGSignature();

$this->consumeNewLine();

$this->consumeNewLine();
Expand Down
12 changes: 12 additions & 0 deletions tests/Gitonomy/Git/Tests/CommitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,18 @@ public function testGetMessage($repository)
$this->assertEquals('add a long file'."\n", $commit->getMessage());
}

/**
* This test ensures that GPG signed commits does not break the reading of a commit
* message.
*
* @dataProvider provideFoobar
*/
public function testGetSignedMessage($repository)
{
$commit = $repository->getCommit(self::SIGNED_COMMIT);
$this->assertEquals('signed commit'."\n", $commit->getMessage());
}

/**
* @dataProvider provideFoobar
*/
Expand Down