git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Stranges with git-diff-index
@ 2008-09-01  9:28 Сергей Шарыбин
  2008-09-01 10:20 ` Johannes Sixt
  0 siblings, 1 reply; 2+ messages in thread
From: Сергей Шарыбин @ 2008-09-01  9:28 UTC (permalink / raw)
  To: git

Hi,

I've found this strange thing in git diff-index. I've got a clear work
tree (all changes are commited). Then I've changed some files. After
this I've run `git diff-index --name-status HEAD` and this command
showed me changed files. After this I've undid this changes (I did this
myself, not using git-reset or any stuff like this). But when I run this
command again it showed me that this files are still changed. After this
I've run git-status and it told me that there is nothing to commit. And
after this git-diff-index tells me that there is no changed files too.

I think it's not normal.

-- 
With best regards, Sergey I. Sharybin

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Stranges with git-diff-index
  2008-09-01  9:28 Stranges with git-diff-index Сергей Шарыбин
@ 2008-09-01 10:20 ` Johannes Sixt
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Sixt @ 2008-09-01 10:20 UTC (permalink / raw)
  To: Сергей Шарыбин
  Cc: git

Сергей Шарыбин schrieb:
> I've found this strange thing in git diff-index. I've got a clear work
> tree (all changes are commited). Then I've changed some files. After
> this I've run `git diff-index --name-status HEAD` and this command
> showed me changed files. After this I've undid this changes (I did this
> myself, not using git-reset or any stuff like this). But when I run this
> command again it showed me that this files are still changed. After this
> I've run git-status and it told me that there is nothing to commit. And
> after this git-diff-index tells me that there is no changed files too.
> 
> I think it's not normal.

That's perfectly normal.

Low-level git commands ("plumbing", like git diff-index) doesn't look at
the file contents, only at the stat information. Next time use 'git diff
--name-status HEAD'; it wouldn't have reported any changes.

-- Hannes

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-01 10:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-01  9:28 Stranges with git-diff-index Сергей Шарыбин
2008-09-01 10:20 ` Johannes Sixt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).