You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 satır
1.0KB

  1. <?php
  2. /*
  3. * This file is part of the Fxp Composer Asset Plugin package.
  4. *
  5. * (c) François Pluchino <francois.pluchino@gmail.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Fxp\Composer\AssetPlugin\Repository\Vcs;
  11. use Composer\Cache;
  12. use Composer\Repository\Vcs\GitDriver as BaseGitDriver;
  13. /**
  14. * Git vcs driver.
  15. *
  16. * @author François Pluchino <francois.pluchino@gmail.com>
  17. */
  18. class GitDriver extends BaseGitDriver
  19. {
  20. /**
  21. * @var Cache
  22. */
  23. protected $cache;
  24. /**
  25. * {@inheritdoc}
  26. */
  27. public function getComposerInformation($identifier)
  28. {
  29. $resource = sprintf('%s:%s', escapeshellarg($identifier), $this->repoConfig['filename']);
  30. return ProcessUtil::getComposerInformation($this->cache, $this->infoCache, $this->repoConfig['asset-type'], $this->process, $identifier, $resource, sprintf('git show %s', $resource), sprintf('git log -1 --format=%%at %s', escapeshellarg($identifier)), $this->repoDir, '@');
  31. }
  32. }