[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: sha1summ of complete directory?



On Wed, Jul 15, 2009 at 07:36:24AM -0700, Todd A. Jacobs wrote:
> On Mon, Jul 06, 2009 at 07:30:19PM -0500, Ron Johnson wrote:
> 
> > How would one go about computing a *single* hash value for a complete
> > directory tree?
> 
> You might want to look at how git does this. As I understand it, git
> stores hashes of trees, so the implementation may help you.

Not really... the hash git indexes with is that of the compressed object (which
is either a blob, tree, or commit).  Tree and commit objects point at other
objects (which are also stored by hash).  Blobs are the files themselves.

More info:
http://www.gitready.com/beginner/2009/02/17/how-git-stores-your-data.html
http://eagain.net/articles/git-for-computer-scientists/

Cheers,

-- 
Eric Gerlach, Network Administrator
Federation of Students
University of Waterloo
p: (519) 888-4567 x36329
e: egerlach@feds.uwaterloo.ca


Reply to: