git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Clemens Buchacher <drizzd@aon.at>
To: Jon Seymour <jon.seymour@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Is there a quick way to identify commits that reference missing trees or blobs?
Date: Tue, 26 Jul 2011 00:44:08 +0200	[thread overview]
Message-ID: <20110725224408.GA26057@toss.lan> (raw)
In-Reply-To: <20110725223449.GA25560@toss.lan>

On Tue, Jul 26, 2011 at 12:34:50AM +0200, Clemens Buchacher wrote:
> On Sun, Jul 24, 2011 at 02:48:20AM +1000, Jon Seymour wrote:
> >
> > I was wondering if there is a quick way to identify commits that
> > reference missing trees or blobs as identified by git fsck?
> 
> The following command has served me well for this purpose. I apply
> it to each ref in git-for-each-ref:
> 
> $ git rev-list --objects $ref | git cat-file --batch-check

Oh, and here is the output you get for different situations. Exit
status is always 0 unfortunately.

 - missing blob

fatal: missing blob object '78981922613b2afb6025042ff6bd878ac1994e85'
d165426eba5cb4c125bd6e100d1b5de7298eb601 commit 168
848740929e99bda0e1a9783e7daa314c5a9732d5  missing

 - missing tree

error: Could not read 84bf061d017459b4be45a49b8d8dc945e7a7fdf5
fatal: bad tree object 84bf061d017459b4be45a49b8d8dc945e7a7fdf5
abce3ad54002628ab74d72b7e2baa687abcb77f9 commit 168

 - missing parent commit

error: Could not read 3aa66f30aa9799ac38a53b551ac4faca9cbd400b
fatal: Failed to traverse parents of commit 3cfb98a3cbd3f42852e20bd011c7b835b8750df7

Clemens

  reply	other threads:[~2011-07-25 22:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-23 16:48 Is there a quick way to identify commits that reference missing trees or blobs? Jon Seymour
2011-07-25 22:34 ` Clemens Buchacher
2011-07-25 22:44   ` Clemens Buchacher [this message]
2011-07-26  1:39     ` Jon Seymour
2011-07-26  4:20       ` Jon Seymour

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=20110725224408.GA26057@toss.lan \
    --to=drizzd@aon.at \
    --cc=git@vger.kernel.org \
    --cc=jon.seymour@gmail.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).