Thread (6 messages) flat view 6 messages, 3 authors, 2016-06-15

Re: BUG in git diff-index

From: Carlos Martín Nieto <hidden>
Date: 2016-06-15 23:09:08

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help