Jeff King <p...@peff.net> writes: >> But why would fetching a tag (or set of tags) merit a depth of zero? >> Doesn't depth 1 mean "give me the the objects, and none of their >> descendants"? Why use 0? > > That comes from this line: > > transport_set_option(transport, TRANS_OPT_DEPTH, "0"); > > That line blame back to b888d61 (Make fetch a builtin, 2007-09-10), > which isn't incredibly helpful.
Hmm, "0" means "no depth limitations", which is exactly what we want in this "unshallow" case, I would think. The behaviour observed is just like a regular fetch that auto-follows tags, where it has to make a second fetch if the primary fetch fails to include everything that is needed for propagating the tag for whatever reason. Having said that, IIRC, these days a depth limited clone is created implicitly with --single-branch option, and I am not sure what the right behaviour for the auto-following of tags in such a repository. > I think that comes from the original git-fetch.sh, which had: > > ?*) > # do not deepen a shallow tree when following tags > shallow_depth= > > Which makes sense. I think the code at that point is not aware that we > just "unshallowed" and can therefore drop the depth parameter > altogether. But I admit I am not all that familiar with the shallow > code. > > +cc Duy, who can probably say something way more intelligent about this > off the top of his head. :) > > -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html