Skip to content

Commit a1b468e

Browse files
committed
Fix git shortening, it is sunday..
1 parent da2352c commit a1b468e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Composer/Downloader/GitDownloader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ protected function hasMetadataRepository($path)
496496
protected function getShortHash($reference)
497497
{
498498
if (!$this->io->isVerbose() && preg_match('{^[0-9a-f]{40}$}', $reference)) {
499-
return substr($reference, 10);
499+
return substr($reference, 0, 10);
500500
}
501501

502502
return $reference;

tests/Composer/Test/Fixtures/functional/create-project-command.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
create-project seld/jsonlint %testDir% 1.0.0 --prefer-source -n
33
--EXPECT-ERROR--
44
Installing seld/jsonlint (1.0.0)
5-
- Installing seld/jsonlint (1.0.0) Cloning 3b4bc2a96ff5d3fe6866bfe9dd0c845246705791
5+
- Installing seld/jsonlint (1.0.0) Cloning 3b4bc2a96f
66
Created project in %testDir%
77
Loading composer repositories with package information
88
Updating dependencies (including require-dev)

0 commit comments

Comments
 (0)