From: Caleb Cushing Date: Sun, 08 Feb 2009 12:57:52 GMT Subject: Re: checking sha1's of files Message-ID: <81bfc67a0902080457k65988e5bw8a33ea8aff2c0c2f@mail.gmail.com> 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