On Fri, May 3, 2013 at 3:09 AM, Duy Nguyen <pclouds@xxxxxxxxx> wrote: > Subject: [PATCH] clone: open a shortcut for connectivity check > > In order to make sure the cloned repository is good, we run "rev-list > --objects --not --all $new_refs" on the repository. This is expensive > on large repositories. This patch attempts to mitigate the impact in > this special case. > > In the "good" clone case, we only have one pack. If all of the > following are met, we can be sure that all objects reachable from the > new refs exist, which is the intention of running "rev-list ...": > > - all refs point to an object in the pack > - there are no dangling pointers in any object in the pack > - all objects in the pack does not point to objects outside the pack "no objects in the pack point to..." > > The second and third checks can be done with the help of index-pack as > a slight modification of --strict check (which introduces a new > condition for the shortcut: pack transfer must be used and the number > of objects large enough to call index-pack). The first is checked in > check_everything_connected after we get an "ok" from index-pack. > > "index-pack + new checks" is still faster than "index-pack + rev-list" > currently, which is the whole point of this patch. If any of the > conditions fails, we fall back to good old and expensive "rev-list > ..". In that case it's even more expensive because we have to pay for > the new checks in index-pack. > > Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> -- 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