Open jordi-adell opened 8 years ago
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.
Cool, I'll try to have a proper look at this week and merge it in :)
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:
git checkout -b testing123
git rebase -i HEAD~~
pick
s to edit
, save and quitWith 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. ;)
Here is how to detect when we are stuck on a rebase, a merge, or a cherry-pick: https://github.com/joeytwiddle/git-aware-prompt/commit/1c87a4bb474e7b10bec3f8d6605761237b94d998
@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.
@joeytwiddle Good to know that the patch was useful.
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.