1
0
Fork 0
composer/tests/Composer/Test
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
..
Autoload Add test for Generics class 2015-03-09 11:29:04 -07:00
Command Add parallel build to travis script 2013-09-25 10:23:48 +02:00
Config composer config repositories.packagist false 2015-02-16 16:44:13 +01:00
DependencyResolver add --prefer-lowest-stable to update command 2014-12-13 11:51:30 +01:00
Downloader Git Checkout Branch / File Differentiation 2015-03-19 12:50:06 +01:00
EventDispatcher Implement writeError throughout Composer 2015-02-25 11:00:35 +01:00
Fixtures Fix tests 2015-02-27 12:27:56 +00:00
IO Implement writeError throughout Composer 2015-02-25 11:00:35 +01:00
Installer Clean up event dispatching code and make package events extend installer events 2015-02-23 15:34:49 +00:00
Json strict check, testcase(s) 2015-02-10 12:55:49 +01:00
Mock CS fixes 2015-02-24 14:22:54 +00:00
Package CS fixes 2015-02-24 14:22:54 +00:00
Plugin PluginManager refactoring, fixes #3550 2014-12-13 18:54:42 +00:00
Repository github deprecation changes 2015-02-11 10:18:47 +01:00
Util overwrite -> overwriteError 2015-02-25 11:00:35 +01:00
AllFunctionalTest.php Fix env override regression, fixes #3820 2015-03-06 16:21:40 +00:00
ApplicationTest.php Implement writeError throughout Composer 2015-02-25 11:00:35 +01:00
CacheTest.php Fix tests again.. 2014-12-14 13:46:37 +00:00
ComposerTest.php Fail over from source to dist and vice versa when downloads fail 2014-02-24 18:40:33 +01:00
ConfigTest.php Fix error handling for incorrect "repositories" array 2015-01-20 13:03:55 +03:00
InstallerTest.php Implement writeError throughout Composer 2015-02-25 11:00:35 +01:00