On Fri, Aug 9, 2013 at 12:10 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote: > Duy Nguyen <pclouds@xxxxxxxxx> writes: > >> I fail to see the point here. There are two different things: what we >> want to send, and what we can make deltas against. Shallow boundary >> affects the former. What the recipient has affects latter. What is the >> twist about? > > do_rev_list() --> mark_edges_uninteresting() --> show_edge() callchain > that eventually does this: > > static void show_edge(struct commit *commit) > { > fprintf(pack_pipe, "-%s\n", sha1_to_hex(commit->object.sha1)); > } > > was what I had in mind. Now I see. Thanks. mark_edges_uninteresting() actually calls mark_edge_parents_uninteresting(), which calls show_edge(). The middle function is important because after calculating new depth, upload-pack calls register_shallow() for all both old and new shallow roots and those commits will have their 'parents' pointer set to NULL, which renders mark_edge_parents_uninteresting() no-op. So show_edge() is never called on shallow points' parents. >> As for considering objects before shallow boundary uninteresting, I >> have a plan for it: kill upload-pack.c:do_rev_list(). The function is >> created to make a cut at shallow boundary,... > > Hmph, that function is not primarily about shallow boundary but does > all packing in general. > > The edge hinting in there is for thin transfer where the sender > sends deltas against base objects that are known to be present in > the receiving repository, without sending the base objects. OK but edge hinting is the same in pack-objects.c:get_object_list() so the plan might still work, right? I still need to study about extra_edge_obj in upload-pack.c though. That's something knowledge that pack-objects won't have. -- Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html