From: Jeff King Date: Thu, 27 Mar 2014 23:08:11 GMT Subject: Re: [PATCH] git-prompt.sh: make '+' work for unborn branches Message-ID: <20140327230811.GD32434@sigill.intra.peff.net> In-Reply-To: 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 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