Re: Comparing the working tree with a commit should be independent of the index

2012-08-20 Thread Junio C Hamano
Maaartin writes: > On 08/18/2012 11:19 PM, Junio C Hamano wrote: > ... >> In short, I do not think there is a bug in the current behaviour. > > I can live with it. Many thanks for your answer. > > Do you care to copy-paste something to [1], so I could accept your answer? I never post to that sit

Re: Comparing the working tree with a commit should be independent of the index

2012-08-20 Thread Maaartin
On 08/18/2012 11:19 PM, Junio C Hamano wrote: >> Instead I get "deleted file". Adding the file to the index changes >> it. This is IMHO a bug. > > Among the 7 interesting cases, a path missing from the index have 3 > interesting cases. > > In $commitOn filesystem > > Yes

Re: Comparing the working tree with a commit should be independent of the index

2012-08-18 Thread Junio C Hamano
Maaartin writes: > Instead I get "deleted file". Adding the file to the index changes > it. This is IMHO a bug. There are 7 interesting combinations for the state of a path. It either exists in or missing from the commit you are gving to "git diff", it either exists in or missing from the index

Comparing the working tree with a commit should be independent of the index

2012-08-18 Thread Maaartin
I've already posted it to SO [1], but got no satisfactory answer. The command git diff mycommit compares the working tree against mycommit, so it should not depend on the index. But it does as this example shows: git init echo A > A.txt; git add .; git commit -m A; git branch A echo B > B.txt;