Re: [PATCH v2 4/5] index-pack, unpack-objects: add --not-so-strict for connectivity check

2013-05-03 Thread Eric Sunshine
On Fri, May 3, 2013 at 3:09 AM, Duy Nguyen 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 a

Re: [PATCH v2 4/5] index-pack, unpack-objects: add --not-so-strict for connectivity check

2013-05-03 Thread Duy Nguyen
On Thu, May 02, 2013 at 11:55:57PM -0700, Junio C Hamano wrote: > Let's illustrate. Imagine your project as a whole has this history: [snip] OK I agree my approach is flawed. But if all these are met, we can be sure the new refs are good, correct? - all refs point to an object in the pack - t

Re: [PATCH v2 4/5] index-pack, unpack-objects: add --not-so-strict for connectivity check

2013-05-02 Thread Junio C Hamano
Junio C Hamano writes: > Duy Nguyen writes: > >> What do you mean by "partial history"? Do we have dangling pointers >> after doing that commit walker? > > "^C" will leave the objects and it is safe because it will not > update refs. > > But your code that does not verify the full connectivity f

Re: [PATCH v2 4/5] index-pack, unpack-objects: add --not-so-strict for connectivity check

2013-05-02 Thread Junio C Hamano
Duy Nguyen writes: > What do you mean by "partial history"? Do we have dangling pointers > after doing that commit walker? "^C" will leave the objects and it is safe because it will not update refs. But your code that does not verify the full connectivity from such an object (that is outside th

Re: [PATCH v2 4/5] index-pack, unpack-objects: add --not-so-strict for connectivity check

2013-05-02 Thread Duy Nguyen
On Fri, May 3, 2013 at 2:27 AM, Junio C Hamano wrote: >> Object islands (in the new pack) by definition are not connected to >> the main DAG and so invisible to/unreachable from rev-list. index-pack >> examines all objects in the pack and checks links of each object. With >> this approach, islands

Re: [PATCH v2 4/5] index-pack, unpack-objects: add --not-so-strict for connectivity check

2013-05-02 Thread Junio C Hamano
Duy Nguyen writes: > On Thu, May 2, 2013 at 6:35 AM, Junio C Hamano wrote: >> Nguyễn Thái Ngọc Duy writes: >> >>> --not-so-strict only checks if all links from objects in the pack >>> point to real objects (either in current repo, or from the pack >>> itself). It's like check_everything_connec

Re: [PATCH v2 4/5] index-pack, unpack-objects: add --not-so-strict for connectivity check

2013-05-02 Thread Duy Nguyen
On Thu, May 2, 2013 at 6:35 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> --not-so-strict only checks if all links from objects in the pack >> point to real objects (either in current repo, or from the pack >> itself). It's like check_everything_connected() except that: >> >> -

Re: [PATCH v2 4/5] index-pack, unpack-objects: add --not-so-strict for connectivity check

2013-05-01 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > --not-so-strict only checks if all links from objects in the pack > point to real objects (either in current repo, or from the pack > itself). It's like check_everything_connected() except that: > > - it does not follow DAG in order > - it can detect incomplete o

[PATCH v2 4/5] index-pack, unpack-objects: add --not-so-strict for connectivity check

2013-05-01 Thread Nguyễn Thái Ngọc Duy
--not-so-strict only checks if all links from objects in the pack point to real objects (either in current repo, or from the pack itself). It's like check_everything_connected() except that: - it does not follow DAG in order - it can detect incomplete object islands - it seems to be faster than