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

Tag names #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Tag names #26

wants to merge 2 commits into from

Conversation

jordi-adell
Copy link

I added this code to get tag names in case you checkout a specific tag. Instead of just writing detached* as branch name.

You might want to include it the your main repo. I did not tested it extensively, but I will be actively using this fix from now on and will maintain it if necessary.

@jordi-adell
Copy link
Author

I have been using this patch for months now, with several repositories, several machines, and a variety of versions of Ubuntu and Debian. No bug found, yet.

@jimeh
Copy link
Owner

jimeh commented Mar 29, 2016

Cool, I'll try to have a proper look at this week and merge it in :)

@joeytwiddle
Copy link

Thanks jordi, I have been using your code since November and I like it!

But there is one situation where it looks odd: during a rebase. To reproduce:

  • Be safe: git checkout -b testing123
  • Do git rebase -i HEAD~~
  • Change one of the picks to edit, save and quit
  • See the prompt telling you that you are now on branch "undefined"!

With this simple fix I changed the undefined back into *detached during a rebase. You are both welcome to use that if you like.

I did also add some lines which detect and display when we are rebasing or merging, but they will be trapped in the office until next Monday. ;)

@joeytwiddle
Copy link

Here is how to detect when we are stuck on a rebase, a merge, or a cherry-pick: joeytwiddle@1c87a4b

@jimeh
Copy link
Owner

jimeh commented Apr 4, 2016

@joeytwiddle Very nice :)...

I'll be spending some time on a proper update for git-aware-prompt soon. I personally haven't used the project since about 5 years ago when I switched to zsh. So the goal is to incorporate a lot of these kind of improvements, and make it compatible with both bash and zsh, so I can start using it myself again too.

@jordi-adell
Copy link
Author

@joeytwiddle
Good to know that the patch was useful.

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

Successfully merging this pull request may close these issues.

4 participants