Re: [PATCH v2] cache-tree: do not lazy-fetch merge tree

2019-09-10 Thread Jonathan Tan
> Sidenote, just curious: did you originally intend to add this test > before the test script sources 'lib-httpd.sh', or you were about to > append it at the end as usual, but then noticed the warning comment > telling you not to do so? Honestly, I don't remember. I do try to put tests near simila

Re: [PATCH v2] cache-tree: do not lazy-fetch merge tree

2019-09-10 Thread Jonathan Tan
> Junio C Hamano writes: > > > Isn't that what is going on? I thought I dug up the original that > > introduced the has_object_file() call to this codepath to make sure > > we understand why we make the check (and I expected the person who > > is proposing this change to do the same and record t

Re: [PATCH v2] cache-tree: do not lazy-fetch merge tree

2019-09-10 Thread SZEDER Gábor
On Mon, Sep 09, 2019 at 12:01:30PM -0700, Jonathan Tan wrote: > diff --git a/t/t0410-partial-clone.sh b/t/t0410-partial-clone.sh > index 6415063980..3e434b6a81 100755 > --- a/t/t0410-partial-clone.sh > +++ b/t/t0410-partial-clone.sh > @@ -492,6 +492,20 @@ test_expect_success 'gc stops traversal whe

Re: [PATCH v2] cache-tree: do not lazy-fetch merge tree

2019-09-09 Thread Junio C Hamano
Jeff King writes: > I wondered also if this means we should be using OBJECT_INFO_QUICK. > I.e., do we expect to see a "miss" here often, forcing us to re-scan the > packed directory? As a performance optimization hack, it is OK if we did not notice that the tree object, which corresponds to what

Re: [PATCH v2] cache-tree: do not lazy-fetch merge tree

2019-09-09 Thread Jeff King
On Mon, Sep 09, 2019 at 02:05:53PM -0700, Junio C Hamano wrote: > Junio C Hamano writes: > > > Isn't that what is going on? I thought I dug up the original that > > introduced the has_object_file() call to this codepath to make sure > > we understand why we make the check (and I expected the pe

Re: [PATCH v2] cache-tree: do not lazy-fetch merge tree

2019-09-09 Thread Junio C Hamano
Junio C Hamano writes: > Isn't that what is going on? I thought I dug up the original that > introduced the has_object_file() call to this codepath to make sure > we understand why we make the check (and I expected the person who > is proposing this change to do the same and record the finding i

Re: [PATCH v2] cache-tree: do not lazy-fetch merge tree

2019-09-09 Thread Junio C Hamano
Jonathan Tan writes: > When cherry-picking (for example), new trees may be constructed. During > this process, Git constructs the new tree in a struct strbuf, computes > the OID of the new tree, and checks if the new OID already exists on > disk. However, in a partial clone, the disk check causes

[PATCH v2] cache-tree: do not lazy-fetch merge tree

2019-09-09 Thread Jonathan Tan
When cherry-picking (for example), new trees may be constructed. During this process, Git constructs the new tree in a struct strbuf, computes the OID of the new tree, and checks if the new OID already exists on disk. However, in a partial clone, the disk check causes a lazy fetch to occur, which i