git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Caleb Cushing <xenoterracide@gmail.com>
To: git@vger.kernel.org
Subject: checking sha1's of files
Date: Sun, 8 Feb 2009 04:39:19 -0500	[thread overview]
Message-ID: <81bfc67a0902080139j1331d967g34bfc18f4068e443@mail.gmail.com> (raw)

I need to check the hashes of specific files in the repo in an
automated fashion, in another tool.

to be less vague currently gentoo's portage tree has manifests for
each file in the tree, on funtoo and regen2 (forks) we've imported the
tree into git. Git has all the manifesting that's needed (most of it,
still doesn't help with files outside the tree) in it. I'd like to be
able to remove manifests from the tree, however I still want to check
that the ebuilds (package format) are consistent at run time. Checking
the entire tree is not sane.

I figure the best way to do this is to first check stat against the
index, then, if that passes check the sha1, if that passes continue to
the next step.

I don't want to do anything like determine the output of a git command
in my code, I'd rather check to see if the check passed or failed
using return codes or some such. If it is capable of checking these
but would require me to parse output I'd still like to know, as it may
let me get the fix in faster, and I can do better later.

I know git may not be currently capable of this behavior, which means
I should extend it, or even write a new program to deal with it. If
this is the case, is there any documentation on how git does this?
aside from the source? could someone point me in the general direction
of source files I should be looking at? maybe even specific functions?

any help with this endeavor of any kind would be appreciated as the
manifests 'cause the repo to balloon, not to mention are just a pain
to manage as they can't actually be merged.
-- 
Caleb Cushing

http://xenoterracide.blogspot.com

             reply	other threads:[~2009-02-08  9:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-08  9:39 Caleb Cushing [this message]
2009-02-08  9:58 ` checking sha1's of files 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

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=81bfc67a0902080139j1331d967g34bfc18f4068e443@mail.gmail.com \
    --to=xenoterracide@gmail.com \
    --cc=git@vger.kernel.org \
    /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).