Re: [PATCH] git-prompt.sh: make '+' work for unborn branches
- From
Jeff King <peff@peff.net>
- Date
- Mar 27, 2014, 23:08 UTC
- Message-ID
- <20140327230811.GD32434@sigill.intra.peff.net>
- In-Reply-To
- <CABbCQwskqZzzRXm5K3dnOfRoAcx8jpsdskngmN7f1EvY6BONgw@mail.gmail.com>
On Thu, Mar 06, 2014 at 10:16:47PM +0100, Maurice Bos wrote:
Show 6 quoted lines
> 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 > far as I tested. That would make the patch a little prettier, as it doesn't > contain the empty tree id any more:
I think it probably goes in the wrong direction, though. The prompt code should probably be building on plumbing, not porcelain. So your original patch as-is is probably the most sensible thing (we may want to convert the first git-diff call to use plumbing, too, but that would be a separate patch).
It looks like Junio did not pick up your patch. You may want to repost it.
-Peff