From: Caleb Cushing <xenoterracide@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: checking sha1's of files
Date: Sun, 8 Feb 2009 05:53:31 -0500 [thread overview]
Message-ID: <81bfc67a0902080253x5082201co7da3319b8237f5a0@mail.gmail.com> (raw)
In-Reply-To: <7veiy9z1v8.fsf@gitster.siamese.dyndns.org>
On Sun, Feb 8, 2009 at 4:58 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Caleb Cushing <xenoterracide@gmail.com> 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
next prev parent reply other threads:[~2009-02-08 10:55 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 [this message]
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
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=81bfc67a0902080253x5082201co7da3319b8237f5a0@mail.gmail.com \
--to=xenoterracide@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).