git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Turner <dturner@twopensource.com>
To: Ch'Gans <chgans@gna.org>
Cc: git@vger.kernel.org
Subject: Re: Strange diff-index output
Date: Mon, 02 Nov 2015 19:27:49 -0500	[thread overview]
Message-ID: <1446510469.4131.35.camel@twopensource.com> (raw)
In-Reply-To: <CABxGUTj-5vdmyVGkKuoMdBAG2EAQvLJNYLLA++T2hNFvGRmb0w@mail.gmail.com>

On Tue, 2015-11-03 at 12:59 +1300, Ch'Gans wrote:
> Hi there,
> 
> We're using a script to verify that what we are building is clean
> against our git repository, for this we're using "git rev-parse
> --short HEAD" to get the current hash and "git diff-index --quiet
> HEAD" to check for local modification.

See this note from the git diff-index man page:
           Note
           As with other commands of this type, git diff-index does not
           actually look at the contents of the file at all. So maybe
           kernel/sched.c hasn’t actually changed, and it’s just that
you
           touched it. In either case, it’s a note that you need to git
           update-index it to make the index be in sync.

You can either add an update-index to your script, or use git status
--porcelain.

  reply	other threads:[~2015-11-03  0:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-02 23:59 Strange diff-index output Ch'Gans
2015-11-03  0:27 ` David Turner [this message]
2015-11-03  1:00   ` Ch'Gans
2015-11-04  6:38     ` Jeff King

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=1446510469.4131.35.camel@twopensource.com \
    --to=dturner@twopensource.com \
    --cc=chgans@gna.org \
    --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
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).