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

[feature] Make vcs status --hide show when branch diverged from their remote #35

Closed
mikaelarguedas opened this issue Mar 17, 2017 · 2 comments

Comments

@mikaelarguedas
Copy link
Contributor

If it is of any interest I can try to take a shot at it. For the git client for example, we could apply something like:

-            cmd = [GitClient._executable, 'status', '-s']
+            cmd = [GitClient._executable, 'status', '-s', '-b']
             if command.quiet:
                 cmd += ['--untracked-files=no']
             result = self._run_command(cmd)
-            if result['returncode'] or not result['output']:
+            if result['returncode'] or ('\n' not in result['output'] and 'ahead' not in result['output'] and 'behind' not in result['output']):
+                result['output'] = ''

Not sure how it would work for locales though. Didn't look at other vcs systems to see if something similar can be done easily

@dirk-thomas
Copy link
Owner

I have created PR #36 to implement this improved behavior without relying on the output. It would be great if you could try the modified version from source and report if it addresses your use case.

@mikaelarguedas
Copy link
Contributor Author

Tried with all the cases I use status --hide:

  • unstaged changes
  • staged changes
  • ahead
  • behind
  • diverged (ahead and behind)

Works fine for all cases 👍 🎉 thanks!

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

No branches or pull requests

2 participants