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 10, 2016, 21:40 UTC
Message-ID
<20160310214042.GB32608@sigill.intra.peff.net>
In-Reply-To
<xmqqbn6mdnyn.fsf@gitster.mtv.corp.google.com>
On Thu, Mar 10, 2016 at 01:26:08PM -0800, Junio C Hamano wrote:
Show 15 quoted lines
> > IMHO, that is the right thing. They asked for "C" as a shallow cut-off
> > point, so anything that is a parent of "C" should be omitted as shallow,
> > too. It has nothing to do with the numeric depth, which was just the
> > starting point for generating the shallow cutoffs.
> 
> I think that is the right mental model.  The statement that "C and D
> are current cut points" does not make much sense.  As you cannot
> rewrite parents of commits after the fact, you cannot construct a
> case like "when the shallow clone originally was made, two histories
> were forked long time before B and D, and the cloner ended up with C
> and D as the cutoff point, but now that we have the ancestry linkage
> between B and D (and C and E), we need to make E a new cutoff".  The
> original "shallow" implementation does not store "starting point +
> number of depth" and instead translates that to the cut-off point
> for this exact reason.
OK, good. Now there are at least two of us who view it that way. :)
Show 16 quoted lines
> > Yeah, we definitely need an extension. I'm not sure if the extension
> > should be "I know about spontaneous shallow/deepen responses; it's OK to
> > send them to me" or "I want you to include the shallow points I send as
> > boundary cutoffs for further shallow-ing of newly fetched history".
> >
> > They amount to the same thing when implementing _this_ feature, but the
> > latter leaves us room in the future for a client to say "sure, I
> > understand your spontaneous responses, but I explicitly _don't_ want you
> > to do the boundary computation". I don't know if that is useful or not,
> > but it might not hurt to have later on (and by adding it now, it "just
> > works" later on with older servers/clients).
> 
> I am not sure what distinction you are worried about.  An updated
> client that is capable of saying "you may give shallow/deepen
> responses to me" can optionally be told not to say it to the server,
> and that is equivalent to saying "I don't want you to send them", no?

Mostly, I wondered if we would need to send spontaneous shallow lines for any other cases, and the client would not be able to say "I understand them and want them in case A, but not in case B".

I do not have any case A in mind; it was just a general sense of "let's make feature flags as specific as possible to avoid painting ourselves into a corner". I'm OK with implementing it either way.

-Peff
Previous: Junio C HamanoNext: Duy Nguyen
Message 13 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.