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

Re: Bug report: stash in upstream caused remote fetch to fail

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 6, 2014, 16:16 UTC
Message-ID
<xmqqbnzpkrvk.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20140106152742.GA26221@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 25 quoted lines
> On Fri, Jan 03, 2014 at 04:12:51PM -0500, Matt Burke wrote:
>
>> + git init -q
>> + git fetch -q -fu ../../../other '+refs/*:refs/*'
>> fatal: bad object 9b985fbe6a2b783c16756077a8be261c94b6c197
>> error: ../../../other did not send all necessary objects
>
> I was going to ask you to send your repository, but I can easily
> reproduce here. I guess people don't run into it because it's uncommon
> to fetch the whole refs/ namespace from a non-bare repo (and bare repos
> do not tend to have stashes). Here's a minimal reproduction recipe:
>
>   git init repo &&
>   cd repo &&
>   echo content >foo &&
>   git add . &&
>   git commit -m foo &&
>   echo more >>foo &&
>   git stash &&
>   git init --bare sub &&
>   cd sub &&
>   git fetch .. 'refs/*:refs/*'
>
> It looks like we are not feeding refs/stash properly to pack-objects.
> I'll try to take a closer look later today.

I looked at this in the past and I vaguely recall that we reject it in the for-each-ref loop with check-ref-format saying "eh, that is a single-level name".

At that point I stopped digging, thinking it was a feature ;-) based on your exact observation about stash vs bare/non-bare.

Previous: Jeff KingNext: Jeff King
Message 3 of 10 in “Re: Bug report: stash in upstream caused remote fetch to fail”
  1. Matt BurkeJan 3, 2014
  2. Jeff KingJan 6, 2014
  3. Junio C HamanoJan 6, 2014
  4. Jeff KingJan 6, 2014
  5. Junio C HamanoJan 6, 2014
  6. Jeff KingJan 6, 2014
  7. Junio C HamanoJan 6, 2014
  8. Junio C HamanoJan 7, 2014
  9. Jeff KingJan 15, 2014
  10. Jeff KingJan 15, 2014

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.