Re: [PATCH] git-fetch: avoid local fetching from alternate (again)

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] git-fetch: avoid local fetching from alternate (again)

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:48

"Shawn O. Pearce" [off-list ref] writes:
Back in e3c6f240fd9c5bdeb33f2d47adc859f37935e2df Junio taught
git-fetch to avoid copying objects when we are fetching from
a repository that is already registered as an alternate object
database.  In such a case there is no reason to copy any objects
as we can already obtain them through the alternate.
Well spotted.  It would be a good idea to commit the big comment
from contrib/examples/git-fetch.sh to fetch_local_nocopy()
function, which would have made us realize that the patch does
not refrain from applying this optimization even when shallow
is in effect.  But I think that is actually a good change.

The run-command change and the main part of the fix are
logically independent.

The regression the patch fixes should be testable with a
script.  Please have a new test for it.

Thanks.

Re: [PATCH] git-fetch: avoid local fetching from alternate (again)

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:43:48

Junio C Hamano [off-list ref] wrote:
"Shawn O. Pearce" [off-list ref] writes:
quoted
Back in e3c6f240fd9c5bdeb33f2d47adc859f37935e2df Junio taught
git-fetch to avoid copying objects when we are fetching from
a repository that is already registered as an alternate object
database.  In such a case there is no reason to copy any objects
as we can already obtain them through the alternate.
The regression the patch fixes should be testable with a
script.  Please have a new test for it.
Hmmph.  t5502-quickfetch should have covered this.  It obviously
wasn't testing the right thing here.  I'll figure out why and post
a patch to fix t5502.

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help