From: Carlos Martín Nieto Date: Thu, 31 Mar 2016 13:57:47 GMT Subject: Re: BUG in git diff-index Message-ID: <1459432667.2124.2.camel@dwim.me> In-Reply-To: On Thu, 2016-03-31 at 12:39 +0000, Andy Lowry wrote: > Following transcript illustrates what I believe to be a bug in git > diff- > index. The session used a git built from latest source, located in  > /tmp/git/git. > > 1. New repo, create empty file A, commit changes. > 2. touch A > 3. git diff-index reports A has changed, and reports bogus > destination  > SHA > 4. This is stable behavior until next step This is expected and matches the documentation. See the bit starting with     OPERATING MODES            You can choose whether you want to trust the index file entirely (using the --cached flag) or ask the diff            logic to show any files that don’t match the stat state as being "tentatively changed". Both of these         operations are very useful indeed. The next two sections describe what you are seeing. The default is non- cached mode which also shows files which don't match the stat data in the index (which you've changed by touching the file). Cheers,    cmn