Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. GitDriver.php

function GitDriver::getChangeDate

@inheritDoc

Overrides VcsDriverInterface::getChangeDate

File

vendor/composer/composer/src/Composer/Repository/Vcs/GitDriver.php, line 165

Class

GitDriver
@author Jordi Boggiano <j.boggiano@seld.be>

Namespace

Composer\Repository\Vcs

Code

public function getChangeDate(string $identifier) : ?\DateTimeImmutable {
    $this->process
        ->execute([
        'git',
        '-c',
        'log.showSignature=false',
        'log',
        '-1',
        '--format=%at',
        $identifier,
    ], $output, $this->repoDir);
    return new \DateTimeImmutable('@' . trim($output), new \DateTimeZone('UTC'));
}
RSS feed
Powered by Drupal