1
0
Fork 0
composer/tests/Composer/Test/Downloader
hakre 7077803aa4 Git Checkout Branch / File Differentiation
This fixes a minor inaccuracy issue when creating git checkout commands
for branches.

The git checkout command used within `GitDownloader::updateToCommit()`
does not use the "`--`" sequence to separate branch from file parameters.

This leads to an inaccuary as git tries as well the branch name as file
name. If the non-existent branch is actually the name of a file, the file
is checked out. If the non-existent branch is not the name of a file, an
error message is given:

> error: pathspec 'non-existent-branch' did not match any file(s) known to
git.

Both cases are not expected for the program flow in
`GitDownloader::updateToCommit()`.

The only thing that is expected is a non-existent branch to fail to
checkout - but with a different error message:

> // reference was not found (prints "fatal: reference is not a tree:
 $ref")

This can be easily fixed by adding the missing separator when constructing
the command which is applied with this commit.
2015-03-19 12:50:06 +01:00
..
Fixtures Update PEAR Package Extractor to use 'task:replace', 'phprelease' commands and install role='script' files 2012-07-03 19:18:58 +11:00
ArchiveDownloaderTest.php Oops 2013-07-05 00:47:18 +02:00
DownloadManagerTest.php Fail over from source to dist and vice versa when downloads fail 2014-02-24 18:40:33 +01:00
FileDownloaderTest.php CS fixes 2014-06-10 16:13:12 +02:00
GitDownloaderTest.php Git Checkout Branch / File Differentiation 2015-03-19 12:50:06 +01:00
HgDownloaderTest.php Add support for mirrors in composer repos 2014-05-07 19:34:35 +02:00
PearPackageExtractorTest.php CS fixes 2014-10-17 18:57:27 +01:00
PerforceDownloaderTest.php Implement writeError throughout Composer 2015-02-25 11:00:35 +01:00
ZipDownloaderTest.php Add support for mirrors in composer repos 2014-05-07 19:34:35 +02:00