git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Caleb Cushing <xenoterracide@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: checking sha1's of files
Date: Sun, 8 Feb 2009 07:57:52 -0500	[thread overview]
Message-ID: <81bfc67a0902080457k65988e5bw8a33ea8aff2c0c2f@mail.gmail.com> (raw)
In-Reply-To: <20090208122731.GA24442@coredump.intra.peff.net>

> If you want to know whether a file matches HEAD, just do:
>
>  git diff --quiet HEAD -- $LIST_OF_FILES
>
> which will return '0' for no changes or '1' if there are changes.

*headdesks* and somehow I think this is exactly what I need.

> Which really has nothing to do with hashes at all (though git will use
> them internally to avoid actually running a textual diff at all).  I was
> assuming that you didn't necessarily _have_ the git repository at
> verification time. So the hash becomes an easy way of saying "this is
> what the file _should_ look like".

I love git because it's so powerful, just like the rest of *nix. No
matter how long I use it something always makes me feel like a n00b.

the problem is that I only half understand what git is doing, just
enough to attempt a communication of what I want to do. It doesn't
help that I'm not the expert on the other side of this problem either.

thanks for the help guys, even if I do come off like a moron.
-- 
Caleb Cushing

http://xenoterracide.blogspot.com

      reply	other threads:[~2009-02-08 12:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-08  9:39 checking sha1's of files Caleb Cushing
2009-02-08  9:58 ` Junio C Hamano
2009-02-08 10:53   ` Caleb Cushing
2009-02-08 11:13     ` Jeff King
2009-02-08 12:22       ` Caleb Cushing
2009-02-08 12:27         ` Jeff King
2009-02-08 12:57           ` Caleb Cushing [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=81bfc67a0902080457k65988e5bw8a33ea8aff2c0c2f@mail.gmail.com \
    --to=xenoterracide@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /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).