Skip to content

Commit

Permalink
GitRepository: fixed getCommitDate()
Browse files Browse the repository at this point in the history
  • Loading branch information
sudo-plz authored Jul 3, 2020
1 parent ed44221 commit db664a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/GitRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ public function getCommitMessage($commit, $oneline = FALSE)
public function getCommitDate($commit = '', $dateFormat = 'iso-strict')
{
$this->begin();
$lastLine = exec('git log -1 ' . $commit . ' --date=' . $dateFormat);
$lastLine = exec('git log -1 ' . $commit . ' --pretty="format:%cd" --date=' . $dateFormat);
$this->end();

try {
Expand All @@ -938,7 +938,7 @@ public function getCommitDate($commit = '', $dateFormat = 'iso-strict')
* Returns commit author from specific commit
* `git log -1 --format='%ae'`
* @param string commit ID (if empty last commit)
* @return string|NULL
* @return string
* @throws GitException
*/
public function getCommitAuthor($commit = '')
Expand Down

0 comments on commit db664a8

Please sign in to comment.