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

git fetch from additional remote fails with a treeless clone

From
CRChristoph Reiter <reiter.christoph@gmail.com>
Date
May 30, 2024, 17:37 UTC
Message-ID
<51363037334634e27580664f104886d5eaa9b4fb.camel@gmail.com>

Thank you for filling out a Git bug report! Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)

(I tried to come up with dummy repos with a similar relationship but failed to reproduce the issue there, and --filter doesn't work for local repos, so I gave up and I'm just using the repos where the issue occured instead)

This does a treeless clone of an outdated fork, then adds the upstream and fetches from it.

rm -Rf MINGW-packages git clone --filter=tree:0 https://github.com/lazka/MINGW-packages cd MINGW-packages git remote add upstream https://github.com/msys2/MINGW-packages git fetch upstream

What did you expect to happen? (Expected behavior)
fetching in the treeless clone works as with a non-treeless clone
What happened instead? (Actual behavior)

fatal: bad revision 'e346057a67cffe54493cf87e24498229b8a370cc' error: https://github.com/lazka/MINGW-packages did not send all necessary objects

fatal: could not fetch e346057a67cffe54493cf87e24498229b8a370cc from promisor remote fatal: fetch-pack: invalid index-pack output

What's different between what you expected and what actually happened?

The treeless clone does not work as the non-treeless clone when fetching.

Anything else you want to add:
Also reproduced on cygwin git 2.45.1

Please review the rest of the bug report below. You can delete any lines you don't wish to share.

[System Info] git version: git version 2.43.0 cpu: x86_64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh uname: Linux 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64 compiler info: gnuc: 13.2 libc info: glibc: 2.39 $SHELL (typically, interactive shell): /bin/zsh

[Enabled Hooks] not run from a git repository - no hooks to show

Message 1 of 1 in “git fetch from additional remote fails with a treeless clone”
  1. Christoph ReiterMay 30, 2024

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.