New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve status for unpushed branches #3633
Improve status for unpushed branches #3633
Conversation
@@ -120,6 +143,13 @@ protected function cleanChanges(PackageInterface $package, $path, $update) | |||
{ | |||
GitUtil::cleanEnv(); | |||
$path = $this->normalizePath($path); | |||
|
|||
if ($this instanceof DvcsDownloaderInterface) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this makes no sense. It will always be true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea, I guess so! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stof : fixed
45c8061
to
542825d
Compare
What's the upside of this over #2253 (comment) ? |
From the description of #2253 this does not only work for branches that have diverged, but for changes branches that are behind their remote counterpart (but maybe the description is bad). Plus, it gives a better feedback with what exactly is wrong with status codes : there are different status codes for different situations (changes commited but not pushed, changes not commited, (changes commited and not pushed in one vendor && changes not commited in another)). |
Also, it is more generic : there is an interface that is introduced so that the same functionality can be implemented for mercurial, bazaar and your favorite DCVS. |
`composer status` now prevents overwriting Git package if changes have not been pushed.
542825d
to
9e30c9b
Compare
I just rebased, the tests are green. |
Better late than never I guess :) Thanks for merging that! |
This is a cleaned up, rebased, resurrection of #2085