Преглед изворни кода

Issue #4512 Set reference in path repository

Joel Wurtz пре 9 година
родитељ
комит
7f42fe4c10
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      src/Composer/Repository/PathRepository.php

+ 2 - 0
src/Composer/Repository/PathRepository.php

@@ -121,6 +121,8 @@ class PathRepository extends ArrayRepository
             }
             if (is_dir($path.'/.git') && 0 === $this->process->execute('git log -n1 --pretty=%H', $output, $path)) {
                 $package['dist']['reference'] = trim($output);
+            } else {
+                $package['dist']['reference'] = sha1($json);
             }
 
             $package = $this->loader->load($package);