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

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

From
Bagas Sanjaya <bagasdotme@gmail.com>
Date
May 7, 2021, 12:56 UTC
Message-ID
<6422f505-29c4-bee9-e28c-b77dd831c246@gmail.com>
Hi,

I have a copy of Gitea application repository [1] on my local Git server on my computer. I was playing with partial clones using that repository as remote.

I began with blobless clone the repo by:
$ git clone https://<myhost>/bagas/gitea.git gitea --filter=blob:none
Then I tried to fetch missing objects. First, I gathered list of them:
$ git rev-list --objects --all --missing=print | grep -o -P '^\?\K\w+' > .git/missing.list

I had asked how to properly fetch objects from the list above before on this list, and brian m. carlson (CC'ed) suggested [2] that I should use xargs:

$ xargs git fetch origin < .git/missing.list

I expected that I received all missing objects. However, the error message I got was something like below, repeated:

Show 8 quoted lines
> remote: ...<skipped>
> Receiving objects: 100% (64/64), 154.49 KiB | 2.97 MiB/s, done.
> remote: ...<skipped>
> Receiving objects: 100% (37/37), 168.35 KiB | 4.95 MiB/s, done.
> Resolving deltas: 100% (5/5), done.
> Resolving deltas: 100% (49/49), completed with 47 local objects.
> fatal: bad revision 'd5e9cd36ab21839af3d116eff3221c53f6ca7fd6'
> error: https://<myhost>/bagas/gitea.git did not send all necessary objects

Then I repeated the object list gathering and fetching above, and the error still occured. Even I tried fetching only one of problematic object above and still errored.

When I inspected that object with `git cat-file -p` from my other, full clone version (which I used for submitting changes upstream), the object is properly displayed (in this case as source code in Go).

Note that I have uploadpack.allowfilter=true config on the server.
Am I missing something?

[1]: https://github.com/go-gitea/gitea [2]: https://lore.kernel.org/git/YD7bczBsIR5rkqfc@camp.crustytoothpaste.net/

-- 
An old man doll... just what I always wanted! - Clara
Next: Jeff Hostetler
Message 1 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.