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

Re: dangling blob which is not dangling at all

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Aug 1, 2007, 02:22 UTC
Message-ID
<alpine.LFD.0.999.0707311914570.4161@woody.linux-foundation.org>
In-Reply-To
<20070801013450.GA16498@raptus.dandreoli.com>
On Wed, 1 Aug 2007, Domenico Andreoli wrote:
Show 7 quoted lines
> 
> $ git fsck --no-reflogs
> dangling blob e5d444e61b834c34710ce8fb5cb176e20e5894e1
>
> $ git-ls-tree 70b58535361eb633d44d4f1275af3421ca6a5ed7
> ...
> 100644 blob e5d444e61b834c34710ce8fb5cb176e20e5894e1    link_stream.c
Have you done clones with stupid protocols (rsync and/or http)?

The simplest explanation for this is that since you didn't do "--full" for fsck, then your git-fsck never looked into the pack-files you had. And the tree might well exist in a pack-file, and thus not even looked at by fsck.

So try "git fsck --full", and see if that changes the picture.

(Usually, you'd never have a pack-file *and* the loose object it points to both at the same time, but especially if you use the dumb transports (rsync and/or http), you'll get pack-files from remotes, and thus you won't have the normal nice behaviour of pack-files being "old state", and loose objects being "new state".

The easiest fixup is likely to just do "git gc", which which do a nice repack, and get rid of loose objects that are duplicates of stuff that is also in a pack-file.

		Linus
Previous: Domenico AndreoliNext: Domenico Andreoli
Message 2 of 8 in “dangling blob which is not dangling at all”
  1. Domenico AndreoliAug 1, 2007
  2. Linus TorvaldsAug 1, 2007
  3. Domenico AndreoliAug 1, 2007
  4. Junio C HamanoAug 1, 2007
  5. Domenico AndreoliAug 1, 2007
  6. Steven GrimmAug 1, 2007
  7. Rogan DawesAug 1, 2007
  8. Domenico AndreoliAug 1, 2007

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.