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

Partial clone fails with file:/// URI

From
Nipunn Koorapati <nipunn1313@gmail.com>
Date
Oct 14, 2020, 16:38 UTC
Message-ID
<CAN8Z4-XgctFZxZoTWRpD1V9NFr34ObzG2dxUoAfuJ4NOsBDdtg@mail.gmail.com>
Hi friends,
When I run a git clone with --filter and a file:/// URI - it fails.
Repro steps:

I have the `git` repo cloned and built into the CWD at v2.28.0 git/git clone --filter=blob:none file:///home/nipunn/src/git git2

nipunn@nipunn-dbx:~/src$ git/git clone --filter=blob:none file:///home/nipunn/src/git git2 Cloning into 'git2'... warning: templates not found in /home/nipunn/share/git-core/templates remote: Enumerating objects: 177110, done. remote: Counting objects: 100% (177110/177110), done. remote: Compressing objects: 100% (61436/61436), done. Receiving objects: 100% (177110/177110), 62.58 MiB | 43.95 MiB/s, done. remote: Total 177110 (delta 114305), reused 176904 (delta 114102), pack-reused 0 Resolving deltas: 100% (114305/114305), done. fatal: the remote end hung up unexpectedly fatal: protocol error: bad pack header warning: Clone succeeded, but checkout failed. You can inspect what was checked out with 'git status' and retry with 'git restore --source=HEAD :/'

It seems to work ok with a remote URI or w/o a --filter arg. I was able to confirm that the "bad pack header" is a "-1" response code PH_ERROR_EOF Perhaps the `fatal: protocol error: bad pack header` - should include the error code as well. Thanks --Nipunn

Next: Taylor Blau
Message 1 of 6 in “Partial clone fails with file:/// URI”
  1. Nipunn KoorapatiOct 14, 2020
  2. Taylor BlauOct 14, 2020
  3. Nipunn KoorapatiOct 14, 2020
  4. Taylor BlauOct 14, 2020
  5. Nipunn KoorapatiOct 14, 2020
  6. Jeff KingOct 15, 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.