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

Re: [BUG?] fetch into shallow sends a large number of objects

From
Jeff King <peff@peff.net>
Date
Mar 8, 2016, 12:21 UTC
Message-ID
<20160308122126.GB18535@sigill.intra.peff.net>
In-Reply-To
<CACsJy8C-Wfh16jroWACEFybtnhwYX91GvgGwk8XxJRft4ZURSw@mail.gmail.com>
On Tue, Mar 08, 2016 at 07:53:35AM +0700, Duy Nguyen wrote:
Show 11 quoted lines
> > I also do not offhand think of a good way to use the topology or
> > timestamp to figure out the best "depth" to truncate the side branch
> > at.  The server side may be able to figure out that things before 'F'
> > in your picture is not relevant for a client that has the shallow
> > cut-off at 067f265, but the side branch can be forked arbitrarily
> > long in the past, or it may not even share the ancient part of the
> > history and has its own root commit.
> 
> If a shallow point can reach root without seeing another shallow
> point, we can mark all reachable commits from it shallow. If it sees
> another shallow point, maybe we can mark at the merge point of them..

Hmph, I read your email before sending my other response, but somehow I didn't quite understand what you were saying. Now after having written my long-winded other one, I think I just re-invented the same thing you are proposing here. ;)

> We can also send "here is --depth=10, but only apply it on new refs".
> That should mitigate the problem a bit. But I'm not sure if I can
> solve it completely.

I think "new refs" isn't something we can rely on. For example, in this case the old history may have been merged in and the ref deleted before the fetcher shows up.

-Peff
Previous: Duy NguyenNext: Jeff King
Message 4 of 16 in “[BUG?] fetch into shallow sends a large number of objects”
  1. Jeff KingMar 7, 2016
  2. Junio C HamanoMar 7, 2016
  3. Duy NguyenMar 8, 2016
  4. Jeff KingMar 8, 2016
  5. Jeff KingMar 8, 2016
  6. Duy NguyenMar 8, 2016
  7. Jeff KingMar 8, 2016
  8. Jeff KingMar 8, 2016
  9. Duy NguyenMar 8, 2016
  10. Duy NguyenMar 10, 2016
  11. Jeff KingMar 10, 2016
  12. Junio C HamanoMar 10, 2016
  13. Jeff KingMar 10, 2016
  14. Duy NguyenMar 11, 2016
  15. Junio C HamanoMar 11, 2016
  16. Jeff KingMar 11, 2016

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.