BUG in git diff-index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
5. git diff correctly reports no changes
6. git diff-index now also reports nothing

My understanding is that git diff-index should care only about content 
and file mode, not modification time.

===========================================================
andy@wiki:/tmp$ git/git init xxx
warning: templates not found /home/andy/share/git-core/templates
Initialized empty Git repository in /tmp/xxx/.git/
andy@wiki:/tmp$ cd xxx
andy@wiki:/tmp/xxx$ touch A
andy@wiki:/tmp/xxx$ ../git/git add A
andy@wiki:/tmp/xxx$ ../git/git commit -m initial
[master (root-commit) 370c3ac] initial
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 A
andy@wiki:/tmp/xxx$ touch A
andy@wiki:/tmp/xxx$ ../git/git diff-index HEAD
:100644 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 
0000000000000000000000000000000000000000 M    A
andy@wiki:/tmp/xxx$ ../git/git diff-index HEAD
:100644 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 
0000000000000000000000000000000000000000 M    A
andy@wiki:/tmp/xxx$ ../git/git diff
andy@wiki:/tmp/xxx$ ../git/git diff-index HEAD
andy@wiki:/tmp/xxx$ 

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]