git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: "Сергей Шарыбин" <nazgul@school9.perm.ru>
Cc: git@vger.kernel.org
Subject: Re: Stranges with git-diff-index
Date: Mon, 01 Sep 2008 12:20:26 +0200	[thread overview]
Message-ID: <48BBC1EA.6050005@viscovery.net> (raw)
In-Reply-To: <48BBB5B4.9080805@school9.perm.ru>

Сергей Шарыбин 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

      reply	other threads:[~2008-09-01 10:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-01  9:28 Stranges with git-diff-index Сергей Шарыбин
2008-09-01 10:20 ` Johannes Sixt [this message]

Reply instructions:

You may reply publicly 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

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

  git send-email \
    --in-reply-to=48BBC1EA.6050005@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=git@vger.kernel.org \
    --cc=nazgul@school9.perm.ru \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).