Re: [PATCH 2/2] show color hints based on state of the git tree
- From
- Simon Oosthoek <soosthoek@nieuwland.nl>
- Date
- Oct 15, 2012, 13:20 UTC
- Message-ID
- <507C0D81.7030005@nieuwland.nl>
- In-Reply-To
- <507BD3C1.4040807@drmicha.warpmail.net>
Hi Michael, sorry for the duplicate, forgot to reply-all...
On 10/15/2012 11:13 AM, Michael J Gruber wrote:
> ...only because you don't know the color coding scheme. It's green > because those changes are saved somewhere (in the index) and would even > survice a branch switch. >
But git doesn't exactly let you do this: I modified some things in git-prompt.sh trying to implement some of what we discussed. Then staged the file and tried git checkout HEAD^^ (or any branch)
error: Your local changes to the following files would be overwritten by
checkout:
contrib/completion/git-prompt.sh
Please, commit your changes or stash them before you can switch branches.
AbortingSo I don't think it's all that strange to mark the branch as not quite safe to change. The idea (or at least my idea) behind these hints is that it reminds me to do stuff that prevents these "Aborts". I think that that is a useful feature for any user of git.
In this light, would you accept yellow in the branch color to indicate uncommitted staged changes?
Cheers
Simon