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

Re: problem with updating a shallow clone via a branch fetch

From
RBRick Bradley <rick@rickbradley.com>
Date
Mar 1, 2011, 02:07 UTC
Message-ID
<AANLkTimSRG+UkD1vJszUf+3j0nV+_pPWSE3N2Dy9SfTa@mail.gmail.com>
In-Reply-To
<7vtyfng00i.fsf@alter.siamese.dyndns.org>

Junio, Thanks for the assistance. I'll be looking in the direction of what could have caused sanity problems in the upstream repo. If it happens again and we can collect more tea leaves (this checkout was cleaned up before I could get a copy of it to do further diagnosis :-/) I'll see what else we can find out.

Rick
On Mon, Feb 28, 2011 at 6:25 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 22 quoted lines
> Rick Bradley <rick@rickbradley.com> writes:
>
>> So I have a git repo that is shallow cloned:
>>
>>   % git clone --depth 1 <repo url>
>>
>> Sometimes (very rarely), when I do a branch fetch to update that
>> repository I get an error:
>>
>>  % git fetch origin +refs/head/<branch>:refs/remotes/origin/<branch>
>>
>> fatal: did not find object for shallow <hash>
>
> The message comes from the repository you are fetching from.  When you
> fetch from a shallow clone, the fetch process on your end tells the other
> side what commits your incomplete history ends at, and if the other end
> does not have any of these commits, you get that message.  So the only
> case (unless there is a bug---and I don't think this codepath is heavily
> exercised so it is very possible there are bugs) you would see that
> message is if the other side rewound the branch and then later garbage
> collection lost the commit.
>
Previous: Junio C HamanoNext: Rahul Jain
Message 3 of 4 in “problem with updating a shallow clone via a branch fetch”
  1. Rick BradleyMar 1, 2011
  2. Junio C HamanoMar 1, 2011
  3. Rick BradleyMar 1, 2011
  4. Rahul JainJan 13, 2012

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.