git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Jason Pyeron" <jpyeron@pdinc.us>
To: "'Jeff King'" <peff@peff.net>
Cc: "'Junio C Hamano'" <gitster@pobox.com>, <git@vger.kernel.org>
Subject: RE: I have gone and done a bad thing - malformed tree objects
Date: Fri, 31 Jul 2020 20:01:58 -0400	[thread overview]
Message-ID: <046201d66796$fb575bd0$f2061370$@pdinc.us> (raw)
In-Reply-To: <20200731231521.GB1461090@coredump.intra.peff.net>

> From: Jeff King
> Sent: Friday, July 31, 2020 7:15 PM
> 
> On Fri, Jul 31, 2020 at 07:05:42PM -0400, Jason Pyeron wrote:
> 
> > > If the cruft has already been stored in a packfile, then prune would
> > > not touch it.  "git repack -a -d && git prune --expire=now" would be
> > > the next thing to do.
> >
> > $ git repack -a -d && git prune --expire=now
> > Enumerating objects: 327236, done.
> > Counting objects: 100% (327125/327125), done.
> > Delta compression using up to 8 threads
> > Compressing objects: 100% (104728/104728), done.
> > Writing objects: 100% (327125/327125), done.
> > Total 327125 (delta 205244), reused 326116 (delta 204678), pack-reused 0
> >
> > $ git cat-file --batch-all-objects --batch=objecttype
> > fatal: object 00009623a06b8dea7c151542fc789539599c07d0 changed type!?
> 
> That should be dropping everything that isn't reachable. I'd suggest to
> expire reflogs, though it looks like you've also tried "git gc" with
> reflog expiration. Does removing .git/logs entirely help?
> 
> If not, are you sure it isn't actually reachable from your history? What
> does:
> 
>   git rev-list --all --objects | grep 00009623a06

$ git rev-list --all --objects | grep 00009623a06
00009623a06b8dea7c151542fc789539599c07d0 src/htdocs
(it is still running...)

But that is an expected result, I will be back at work on Sunday.


> 
> say? If no hits, does adding --reflogs to the command-line change it?
> 
> We also consider blobs in the index reachable. I don't recall offhand
> whether that applies to trees mentioned by the cache-trees extension. I
> don't _think_ that would apply to your broken tree, since they'd have
> been generated by Git itself, but possibly removing .git/index (if this
> isn't a bare repo) would help?
> 
> -Peff


  reply	other threads:[~2020-08-01  0:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29  0:47 I have gone and done a bad thing - malformed tree objects Jason Pyeron
2020-07-29  0:52 ` Junio C Hamano
2020-07-29  1:09   ` Jason Pyeron
2020-07-29 18:09     ` Junio C Hamano
2020-07-31 23:05       ` Jason Pyeron
2020-07-31 23:15         ` Jeff King
2020-08-01  0:01           ` Jason Pyeron [this message]
2020-08-01  1:44             ` Jeff King
2020-08-02  2:50               ` Jason Pyeron

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='046201d66796$fb575bd0$f2061370$@pdinc.us' \
    --to=jpyeron@pdinc.us \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).