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

Re: "bad revision" fetch error when fetching missing objects from partial clones

From
Bagas Sanjaya <bagasdotme@gmail.com>
Date
May 15, 2021, 06:52 UTC
Message-ID
<2bd7a4d7-0278-1ab6-9867-a158cd08613f@gmail.com>
In-Reply-To
<YJz4JTsFjTtL7mE2@coredump.intra.peff.net>
On 13/05/21 16.57, Jeff King wrote:
Show 29 quoted lines
> I think it is actually a bug with pack-objects not sending the object,
> but it only seems to trigger with bitmaps. This works:
> 
>    git init repo
>    cd repo
> 
>    echo content >file
>    git add file
>    git commit -m base
> 
>    git config uploadpack.allowfilter true
>    git clone --no-local --bare --filter=blob:none . clone
> 
>    cd clone
>    git fetch origin $(git rev-parse HEAD:file)
> 
> But if I add a "git repack -adb" in the parent repository before the "cd
> clone", then I get:
> 
>    remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
>    fatal: bad revision 'd95f3ad14dee633a758d2e331151e950dd13e4ed'
>    error: /home/peff/tmp/repo/. did not send all necessary objects
> 
> So presumably this is a bug in the bitmap-aware filtering code that is
> not present in the regular filter-traversing code. But what really
> puzzles me is that the result seems totally broken. Yet the test
> coverage in t5310 passes, and nobody has noticed on major sites like
> GitHub (which supports partial clones and most certainly has bitmaps
> enabled).
I can reproduce using your test case above, thanks.

Anyway, for the moment being, I clone using "git clone --depth <N>" and then deepen the clone by "git fetch --deepen <N>" iteratively until complete. I do that because of quota constraints on my network.

-- 
An old man doll... just what I always wanted! - Clara
Previous: Derrick Stolee
Message 12 of 12 in “"bad revision" fetch error when fetching missing objects from partial clones”
  1. Bagas SanjayaMay 7, 2021
  2. Jeff HostetlerMay 11, 2021
  3. Jeff KingMay 13, 2021
  4. Jeff KingMay 13, 2021
  5. Jeff KingMay 14, 2021
  6. Patrick SteinhardtMay 17, 2021
  7. Jeff KingMay 17, 2021
  8. Derrick StoleeMay 17, 2021
  9. Jeff KingMay 18, 2021
  10. Bagas SanjayaMay 18, 2021
  11. Derrick StoleeMay 18, 2021
  12. Bagas SanjayaMay 15, 2021

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.