Skip to content

Commit

Permalink
Ensure author identity
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiu-cristea committed May 7, 2024
1 parent b9175ec commit 255e0ed
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/Gitonomy/Git/Tests/LogTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,14 @@ public function testIterable($repository)
public function testFirstMessageEmpty()
{
$repository = $this->createEmptyRepository(false);
$repository->run('config', ['--local', 'user.name', '"Unit Test"']);
$repository->run('config', ['--local', 'user.email', '"[email protected]"']);

// Edge case: first commit lacks a message.
file_put_contents($repository->getWorkingDir().'/file', 'foo');
$repository->run('add', ['.']);
$repository->run('commit', ['--allow-empty-message', '--no-edit']);

$commits = $repository->getLog()->getCommits();
$this->assertCount(1, $commits);
}
Expand Down

0 comments on commit 255e0ed

Please sign in to comment.