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

Missing blobs after pruning dangling commits

From
Marcin Wiśnicki <mwisnicki@gmail.com>
Date
Aug 22, 2011, 14:29 UTC
Message-ID
<CAC9GOO-cAKTvUyKvrijA8H8z4uRFkTjzJ_dqS_-aO1MYB-yaTw@mail.gmail.com>
Hello,
recently I had git-fsck report some dangling references:

$ git fsck dangling commit 9275ee571ead7a75ba57e16ba23155a178459918 dangling commit 047bd63ae82b7540098515467f50562e374edada dangling commit 839cee3c8e16231e6523ecf8b855ef0863787990 dangling commit f7cb119ea71cb3cc739331f2e26bf3e9fdbba24a dangling commit 68d41b28f320aff303c5a89b25e2243ad2e526f2 dangling commit effcf50a636d2f08e21706f41eb8ae3c4c577166

This is completely local (isolated) repository. Based on related FAQ entry ("remove old objects after filter-branch"), I did this:

$ git reflog expire --expire=0 --all $ git repack -ad $ git prune

Unfortunately, now fsck complains:

$ git fsck missing blob 6d2ddd86d4594f8c756cc31b72d61653255a3161 missing blob 6c537408f0b2226c0b6dae9b0ef0f92710fb25ed missing blob 2db55c1e39fd80e39eccefc617b852d3ac93abe9 $ git --version git version 1.7.6.msysgit.0

Is this a bug ?

Also, how can I find where this blob came from. I've tried grepping all commits in original repo (from backup):

$ gitwhich() {
  git log --all --pretty=format:'%T %H' | while read tree commit; do
    git ls-tree -r $tree | grep -q $1 && echo $commit;
  done
}
$ gitwhich 2db55c1e39fd80e39eccefc617b852d3ac93abe9
but nothing was found.
Next: Michael J Gruber
Message 1 of 3 in “Missing blobs after pruning dangling commits”
  1. Marcin WiśnickiAug 22, 2011
  2. Michael J GruberAug 23, 2011
  3. Marcin WiśnickiAug 23, 2011

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.