-
-
Notifications
You must be signed in to change notification settings - Fork 802
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
Display git tag name in the prompt #233
Conversation
I really like the ahead/behind count as an option (perhaps even enabled by default?). The tag display should probably be in a separate PR. I don't see as much of a common need for displaying tags associated with HEAD. In most (perhaps all) of the source I work with, you wouldn't see tags very often. |
Pull request #256 was already merged and did the Ahead/Behind count, enabled by default but as an option. So this pull request should probably just be for the tag display. |
@drawfour Thanks. There are so many options in GitPromptSettings I must have missed this one. BTW why not enable this feature by default? Is there a perf cost? I don't think since we should have the counts. I really like the ahead/behind by counts in VS and VS Code. RE the tag display. Agreed. Let's close this and see if the OP wants to resubmit tag display as a separate PR. However, the sort of change could probably be done on an individual basis pretty easily. Perhaps we should provide an example of how to take the output from You could make the functions even finer grained as well. Perhaps break down |
@rkeithhill It is enabled by default. It has three settings: "Full" - shows both Ahead/Behind with counts and separate arrows, "Compact" which is what this pull request was originally showing with a value, double arrow, and another value (or if only ahead or behind, just a count with proper arrow), and "Minimal" which is the original way of just showing a single arrow/double arrow. I left it enabled at Full by default. |
Wait a tic. Ah, that PR just got accepted yesterday. OK that is why I'm not seeing it yet. I'm loading a newer versioned snapshot from a few days ago. Thanks for the tip and for that PR! This is a nice enhancement. |
Yup. I've been using that in my private version for about 10 months now, and I can't live without it. :) Glad others like it too. |
Hey! Glad you like that change! |
Yes, thanks. Also take a look at issue #345. I think if we went with this, it would make it easier for you or other folks to customize the "innards" of the Git status summary info. |
This pull request tries to handle two situations (should they be separated?):
Tag is displayed along the branch name similar to this:
The tag is colored in dark gray so that it does not stand out too much.
Might help in certain situations.
The behind/ahead by number is displayed as follows:
[master ↓12]
behind by is always printer after the arrow[master 1↑]
ahead by is always printer before the arrow[master 1↕12]
This should be consistent (ahead-by arrow behind-by)Please review my changes and please tell me, if this is a valuable contribution or not :)