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

Add an option to display the current git branch only. #505

Conversation

laurentbardin
Copy link

This is a first draft fix for #399. It has a few drawbacks and could be enhanced if needed:

  1. if we wanted to implement the mechanism for every supported VCS, it would add one variable each time;
  2. we could use one variable for every VCS, something like LP_ENABLE_VCS_BRANCH_ONLY, but then we lose fine-grained control over it.

I don't think that second point really matters, as the problem mentioned in the issue (slow I/O and big repo) is bound to happen with every VCS at some point.

As for the patch itself, I'm really not fluent with bash so feel free to point any mistake. It looks messy, but it's mostly changes in indentation.

@laurentbardin laurentbardin force-pushed the feature/399-git-branch-no-status branch from fd609cc to aa79009 Compare February 22, 2017 21:20
@laurentbardin
Copy link
Author

Fixed a conflict introduced by #508.

@dolmen dolmen added the git Related to Git VCS data label Feb 22, 2017
@dolmen
Copy link
Collaborator

dolmen commented Feb 22, 2017

This implementation is not efficient. This is the whole function definition that should be overriden if LP_ENABLE_GIT_BRANCH_ONLY is set.

@laurentbardin laurentbardin force-pushed the feature/399-git-branch-no-status branch from e176e1c to e443371 Compare February 23, 2017 12:53
@Rycieos
Copy link
Collaborator

Rycieos commented Jan 28, 2021

Release Candidate v2.0.0-rc.1 is now out, which means that the rework is complete. This has merge conflicts that need to be fixed.

This also is something that should be handled by a Liquidprompt theme. The included alternate_vcs theme is similar to what you are trying to do. I added a barebones example theme to the linked issue.

But if you think others could benefit from this, you can open a PR (or update this one) with a theme in themes/ similar to the alternate_vcs theme. And feel free to ask for help!

@Rycieos
Copy link
Collaborator

Rycieos commented May 2, 2022

Closing as this needs work, a rebase, should now be done with themes, and there have been no updates for years.

@Rycieos Rycieos closed this May 2, 2022
@laurentbardin laurentbardin deleted the feature/399-git-branch-no-status branch May 2, 2022 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
git Related to Git VCS data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants