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

Re: should git download missing objects?

From
Shawn Pearce <spearce@spearce.org>
Date
Nov 13, 2006, 20:10 UTC
Message-ID
<20061113201027.GE17244@spearce.org>
In-Reply-To
<20061113200358.GF7201@pasky.or.cz>
Petr Baudis <pasky@suse.cz> wrote:
Show 11 quoted lines
> On Mon, Nov 13, 2006 at 08:54:14PM CET, Shawn Pearce wrote:
> > Copying the one bad object from another repository immediately fixed
> > the breakage caused, but it was very annoying to not be able to run a
> > "git fetch --missing-objects" or some such.  Fortunately it was just
> > the one object and it was also still loose in another repository.
> > scp was handy.  :-)
> 
> If it's over ssh, this is still where the heavily dusty (and heavily
> "plumby") git-ssh-fetch command is useful, since it can get passed an
> undocumented --recover argument and then it will fetch _all_ the objects
> you are missing, not assuming anything.

Interesting. Since its undocumented I didn't know it existed until now. :)

I'm thinking though that a --recover should just be part of git-fetch, and that it should work on all transports, not just SSH.

Of course you could get into a whole world of hurt where you keep doing fsck-objects --full (listing out the missing), fetching them, only to find more missing, etc. After a coule of cycles of that it may just be better to claim to the other end that you have nothing but want everything (e.g. an initial clone) and get a new pack from which you can pull objects.

But I think that was sort of Junio's point on this topic. I'm just trying to throw in my +1 in favor of a feature that would have recovered that sole missing object without making the end user reclone their entire repository and move pack files around by hand. And I'm being more verbose about it than just +1. :)

Previous: Petr BaudisNext: Junio C Hamano
Message 6 of 10 in “should git download missing objects?”
  1. Anand KumriaNov 12, 2006
  2. Junio C HamanoNov 12, 2006
  3. Alex RiesenNov 13, 2006
  4. Shawn PearceNov 13, 2006
  5. Petr BaudisNov 13, 2006
  6. Shawn PearceNov 13, 2006
  7. Junio C HamanoNov 13, 2006
  8. Petr BaudisNov 14, 2006
  9. Junio C HamanoNov 13, 2006
  10. Alex RiesenNov 13, 2006

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.