git@vger.kernel.org mailing list mirror (one of many)
 help / Atom feed
From: Andy Lowry <andy.work@nglowry.com>
To: git@vger.kernel.org
Subject: BUG in git diff-index
Date: Thu, 31 Mar 2016 12:39:23 +0000 (UTC)
Message-ID: <loom.20160331T143733-916@post.gmane.org> (raw)

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$ 

             reply index

Thread overview: 11+ messages in thread (expand / mbox.gz / Atom feed / [top])
2016-03-31 12:39 Andy Lowry [this message]
2016-03-31 13:57 ` Carlos Martín Nieto
2016-03-31 14:05 ` Jeff King
2016-03-31 14:12   ` Andy Lowry
2016-03-31 14:27     ` Jeff King
2016-03-31 19:30       ` Andy Lowry
2016-03-31 20:39         ` Junio C Hamano
2017-09-26 19:46           ` Marc Herbert
2017-09-26 20:11             ` Eric Wong
2017-09-26 23:27               ` Google indexing https://public-inbox.org/git (was: BUG in git diff-index) Marc Herbert
2017-09-27 21:06             ` Wrong -dirty suffix set by setlocalversion " Marc Herbert

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply to all the recipients using the --to, --cc,
  and --in-reply-to switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20160331T143733-916@post.gmane.org \
    --to=andy.work@nglowry.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

git@vger.kernel.org mailing list mirror (one of many)

Archives are clonable:
	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.org/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox