Skip to content
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

Merged

Conversation

greg0ire
Copy link
Contributor

@greg0ire greg0ire commented Jan 8, 2015

This is a cleaned up, rebased, resurrection of #2085

@@ -120,6 +143,13 @@ protected function cleanChanges(PackageInterface $package, $path, $update)
{
GitUtil::cleanEnv();
$path = $this->normalizePath($path);

if ($this instanceof DvcsDownloaderInterface) {
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stof: indeed!
@asgrim : any rationale behind this ? Can I safely remove it ?

Copy link
Contributor

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! :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stof : fixed

@greg0ire greg0ire force-pushed the improve-status-for-unpushed-branches branch from 45c8061 to 542825d Compare January 8, 2015 18:41
@naderman
Copy link
Member

What's the upside of this over #2253 (comment) ?

@greg0ire
Copy link
Contributor Author

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)).

@greg0ire
Copy link
Contributor Author

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.

asgrim and others added 2 commits August 30, 2015 00:30
`composer status` now prevents overwriting Git package if changes have not been pushed.
@greg0ire greg0ire force-pushed the improve-status-for-unpushed-branches branch from 542825d to 9e30c9b Compare August 29, 2015 22:30
@greg0ire
Copy link
Contributor Author

I just rebased, the tests are green.

@greg0ire
Copy link
Contributor Author

ping @naderman are there any plans to merge this (or #2253) ?

@Seldaek Seldaek added this to the Nice To Have milestone Feb 20, 2016
@Seldaek Seldaek merged commit 9e30c9b into composer:master Feb 25, 2016
Seldaek added a commit that referenced this pull request Feb 25, 2016
@Seldaek
Copy link
Member

Seldaek commented Feb 25, 2016

Thanks @greg0ire, sorry for the delay. I had to do quite a few tweaks though (see be4d385) to avoid false positives for me.. Hopefully it'll go well in the wild and I didn't miss anything.

@greg0ire greg0ire deleted the improve-status-for-unpushed-branches branch February 26, 2016 08:58
@greg0ire
Copy link
Contributor Author

Better late than never I guess :) Thanks for merging that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants