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

problem with updating a shallow clone via a branch fetch

From
RBRick Bradley <rick@rickbradley.com>
Date
Mar 1, 2011, 00:12 UTC
Message-ID
<AANLkTinx01bzzLKk=DfyEvfSz8Hun-YqzJfEDpX7gNSS@mail.gmail.com>
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>

There are only 3 mentions of this error on google, none of which are enlightening. The error is being emitted by receive_need(void) in upload-pack.c. The commit in question exists in the named branch in the upstream repository, and I'm not aware that anything sketchy (forced pushes, etc.) has gone on. I'm going to continue to research the history of the repo and the deployment, but I can't seem to get any insight on what the error actually means (i.e., what conditions would cause this error to be triggered).

Any help is appreciated, Rick

Next: Junio C Hamano
Message 1 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.