git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: I have gone and done a bad thing - malformed tree objects

From
Jason Pyeron <jpyeron@pdinc.us>
Date
Jul 29, 2020, 01:09 UTC
Message-ID
<19cab01d66544$ecb402d0$c61c0870$@pdinc.us>
In-Reply-To
<xmqqh7trb0sr.fsf@gitster.c.googlers.com>
Show 21 quoted lines
> From: Junio C Hamano
> Sent: Tuesday, July 28, 2020 8:52 PM
> 
> "Jason Pyeron" writes:
> 
> > I was trying to "do stuff" using hash-object -t tree --stdin -w,
> > but I accidentally created trees where other trees were marked as
> > blobs. They were dangling and not connected to any actual commits
> > on my branches.
> >
> > After gc and fsck clean ups, everything reports well...
> >
> > Except:
> >
> > $ GIT_TRACE=1 git cat-file --batch-all-objects --batch=objecttype
> 
> gc and fsck may not have pruned the dangling object yet, but
> --batch-all-objects is a request to enumerate objects that exist in
> the repository, regardless of their reachability from any ref.
> 
> Perhaps "git prune --expire=now" would get rid of it?
Both that and
git -c gc.reflogExpire=now -c gc.reflogExpireUnreachable=now   -c gc.rerereresolved=now -c gc.rerereunresolved=now   -c gc.pruneExpire=now -c gc.worktreePruneExpire=now gc --prune=now --aggressive
leave it in.
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 9 in “I have gone and done a bad thing - malformed tree objects”
  1. Jason PyeronJul 29, 2020
  2. Junio C HamanoJul 29, 2020
  3. Jason PyeronJul 29, 2020
  4. Junio C HamanoJul 29, 2020
  5. Jason PyeronJul 31, 2020
  6. Jeff KingJul 31, 2020
  7. Jason PyeronAug 1, 2020
  8. Jeff KingAug 1, 2020
  9. Jason PyeronAug 2, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.