From: Jeff King Date: Thu, 22 Nov 2007 11:57:28 GMT Subject: Re: [PATCH 0/5] Colors for git-add--interactive Message-ID: <20071122115728.GD12913@sigill.intra.peff.net> In-Reply-To: <20071122045437.46ee4638@paradox.zwell.net> On Thu, Nov 22, 2007 at 04:54:37AM -0600, Dan Zwell wrote: > - Does not always properly color the output of git-diff --cc, because > the diff-coloring regular expressions do not match every diff line. > I'm not sure that git-add--interactive normally gets used in the same > situations as git-diff --cc. They don't seem to work well, together, > from the little that I tested (without the color patches applied). > There are a few solutions, but I haven't thought of one that's both > reliable and clean. My impression is that diff --cc is called any time > that HEAD has two parents. Is this correct? I think the only time that git-add--interactive is likely to see a combined diff is when you have unmerged entries in the index. Something like: $ mkdir foo && cd foo && git init $ touch file && git add file && git commit -m added $ echo master >file && git commit -a -m master $ git checkout -b other HEAD^ $ echo other >file && git commit -a -m other $ git merge master $ git diff -Peff