Re: checking sha1's of files

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

 



On Sun, Feb 8, 2009 at 4:58 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Caleb Cushing <xenoterracide@xxxxxxxxx> writes:
>
>> I need to check the hashes of specific files in the repo in an
>> automated fashion, in another tool.
>
> What "hash" are you talking about?  sha1?  md5?  crc?

just at at a vague glance currently sha1, sha256, and rmd160 if I'm
reading the manifest file correct.

> I *think* you are trying to say that gentoo has a tool to compute some
> sort of hash for regular files in their source tree by:
>
>        "gentoo's portage tree has manifests for each file"
>
> but without knowing what kind of hash they use, I cannot tell you if you
> can reuse some part of git to compute their hash without using their tools
> (it also is unclear why you are not using their tool to compute their hash
> and instead are expecting git to know about the specific hash function
> used by them).

I think you misunderstand. I'm not trying to use git to compute their
hash, I'm trying to replace their hash with git. Once I've figured out
how to validate the git hash with 'emerge' (said tool) I will be
removing their hash's.

> For exammple,
>
>        "sha1sum Makefile"
>
> would give you the SHA-1 checksum of the contents of the Makefile.  Is
> that what gentoo's tools expect?

I'm honestly not sure how all it's calculated, only that the gentoo
tool will have to be modified, only part of the Manifest file that
will be left is the check that is used to validate files not in the
tree (e.g. our distfiles, package tarballs)

> If that is the case, that is different
> from the blob object name git will give to the contents of that Makefile,
> so you cannot reuse much of git.
>

git has it's own internal integrity check right? on the blob's.

I don't intend to make git fit gentoo's system, I intend to make
gentoo (or regen2 rather) use git's integrity system. but integrity
checks are only a small part of the larger tool. I have the feeling
that I will have to write code on both ends to make it work. Gentoo
uses rsync and no git repository, so to validate integrity they use
files with recorded hashes in them. as I understand it git hashes the
files (blobs) internally, so now that we've imported the rsync tree
and started using the 'git' protocol we're really doing the same thing
twice, and recording it more than that.

has this explanation helped?

-- 
Caleb Cushing

http://xenoterracide.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux