Re: [PATCH] git-prompt.sh: make '+' work for unborn branches

2014-03-27 Thread Jeff King
On Thu, Mar 06, 2014 at 10:16:47PM +0100, Maurice Bos wrote: I have no clue why git diff --cached isn't used instead of git diff-index. I was wondering about it, but I decided I don't know enough about git and there are probably valid reasons for doing it this way. Though, replacing it with

Re: [PATCH] git-prompt.sh: make '+' work for unborn branches

2014-03-06 Thread Maurice Bos
I have no clue why git diff --cached isn't used instead of git diff-index. I was wondering about it, but I decided I don't know enough about git and there are probably valid reasons for doing it this way. Though, replacing it with with git diff --cached seems to have the exact same behaviour, as

[PATCH] git-prompt.sh: make '+' work for unborn branches

2014-03-05 Thread Maurice Bos
For unborn branches, it now compares the index against the empty tree. (Just like git status does.) Signed-off-by: Maurice Bos m-ou...@m-ou.se --- contrib/completion/git-prompt.sh | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/contrib/completion/git-prompt.sh