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

Re: Partial clone fails with file:/// URI

From
Nipunn Koorapati <nipunn1313@gmail.com>
Date
Oct 14, 2020, 23:41 UTC
Message-ID
<CAN8Z4-V2zb4kLw9wgkWxf+Cs9NdgUu5YHnhtDZm0qiqf4WS+BA@mail.gmail.com>
In-Reply-To
<20201014172746.GB2044338@nand.local>

I improved the "bad pack header" error message in a patch off of v2.28.0 (https://github.com/gitgitgadget/git/pull/755) However, rebasing onto v2.29.0, it seems like the error no longer occurs during checkout. Was there some recent improvement? Looking through the changelog, I'm not finding anything obvious.

It appears that regardless of git config uploadpack.allowanysha1inwant true

we find `git checkout` succeeds on v2.29.0

There is a test case in the PR above Also a manual repro:

cd git git checkout v2.29.0-rc1 make cd .. git/git clone --filter=blob:none file://$(pwd)/git a_clone_of_git

Thanks --Nipunn

On Wed, Oct 14, 2020 at 6:27 PM Taylor Blau <me@ttaylorr.com> wrote:
Show 34 quoted lines
>
> On Wed, Oct 14, 2020 at 06:04:18PM +0100, Nipunn Koorapati wrote:
> > Hi,
> >
> > I've been building git from source and directly using the executable. Roughly
> > ```
> > cd git
> > make
> > cd ..
> > git/git clone --filter=blob:none file://$(pwd)/git a_clone_of_git
> > ```
> >
> > This is what I was missing:
> > git config uploadpack.allowanysha1inwant true
> >
> > If this is not set, then the checkout fails w/ a
> >
> > fatal: protocol error: bad pack header
> >
> > Perhaps the error message and/or docs could be improved here to
> > something with more detail than "bad pack header"?
> > Not seeing anything to suggest this in the docs
> > https://git-scm.com/docs/partial-clone
>
> Ah. OK; I feel much better knowing what the difference between our two
> setups is. This is a long-standing issue (I remember seeing it when I
> was experimenting with partial clones several releases ago) so I'm glad
> that we _don't_ have to treat this as a regression in 2.29.
>
> > Thanks for the prompt response. Appreciated!
> > --Nipunn
>
> Thanks,
> Taylor
Previous: Taylor BlauNext: Jeff King
Message 5 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.