Re: [PATCH 3/3] clone: add `--seed` shorthand

2015-05-27 Thread Junio C Hamano
Jeff King  writes:

> On Sun, May 24, 2015 at 12:07:53PM -0700, Junio C Hamano wrote:
>
>> Jeff King  writes:
>> 
>> > Having slept on it, I really think "--seed" should be "fetch from the
>> > seed into temp refs", and not what I posted earlier.
>> 
>> Yeah, I think that is the right way to do it.
>
> In the meantime, do you want to pick up patches 1 and 2? I think they
> are cleanups that stand on their own, whether we do patch 3 or not.

Thanks for reminding.  Let me take a look.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/3] clone: add `--seed` shorthand

2015-05-27 Thread Jeff King
On Sun, May 24, 2015 at 12:07:53PM -0700, Junio C Hamano wrote:

> Jeff King  writes:
> 
> > Having slept on it, I really think "--seed" should be "fetch from the
> > seed into temp refs", and not what I posted earlier.
> 
> Yeah, I think that is the right way to do it.

In the meantime, do you want to pick up patches 1 and 2? I think they
are cleanups that stand on their own, whether we do patch 3 or not.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/3] clone: add `--seed` shorthand

2015-05-24 Thread Junio C Hamano
Jeff King  writes:

> Having slept on it, I really think "--seed" should be "fetch from the
> seed into temp refs", and not what I posted earlier.

Yeah, I think that is the right way to do it.

And it happens to mesh well with the (not so well advertised but not
so well hidden) plan to allow loaded server side to advise --seed
from bundle hosted elsewhere, e.g.

 * "clone" connects to upload-pack

 * upload-pack advertises --seed=http://cdn.github.com/project.bundle
   via capability

 * "clone" disconnects from upload-pack, and runs (resumable)
   wget to the seed to grab bundle.

 * "clone" then fetches refs/*:refs/remotes/origin/* from the bundle

 * "clone" then continues to fetch into +refs/remotes/origin/* as
   usual, but does an equivalent of using --prune for this fetch
   to drop anything extra/stale that the seed bundle may have
   had.

 * optionally "clone" can immediately "repack".

... which I wanted to see happen in a near future.

And that --seed thing that can name a local bundle file is a very
good first step toward the direction, I think.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/3] clone: add `--seed` shorthand

2015-05-21 Thread Jeff King
On Thu, May 21, 2015 at 06:05:31PM +0200, Johannes Schindelin wrote:

> > +--seed ::
> > +   A convenient shorthand for `--dissociate --reference=`.
> > +
> 
> Since you want to advertise this as an easier way than `--dissociate 
> --reference=`, it might make sense to avoid sending the reader 
> that way, too.
> 
> Maybe something like
> 
> --seed ::
> Fetch objects from  instead of the clone URL when
> possible. This is useful when a (possibly partial) clone already
> exists locally, to avoid transferring the same objects again.

Yeah, I agree that is much better (it's the "4/3" I suggested in the
cover letter).

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/3] clone: add `--seed` shorthand

2015-05-21 Thread Jeff King
On Fri, May 22, 2015 at 08:37:56AM +0200, Johannes Schindelin wrote:

> > +--seed ::
> > +Fetch objects from  or  instead of the clone
> > URL when possible. This is useful when a (possibly partial) clone
> > already exists locally, to avoid transferring the same objects again.
> > 
> > I haven't checked if the invocation would accept a bundle filename,
> > but I'm presuming it can in the same way that clone does.
> 
> The proof would lie in the pudding ;-) Would you mind testing whether it 
> works with bundles?

I can't imagine that it would with my patch. The implementation is based
on --reference, which is going to try to set up the bundle as an
alternate.

Having slept on it, I really think "--seed" should be "fetch from the
seed into temp refs", and not what I posted earlier.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/3] clone: add `--seed` shorthand

2015-05-21 Thread Johannes Schindelin
Hi Philip,

On 2015-05-21 21:45, Philip Oakley wrote:
> From: "Johannes Schindelin" 
>>
>> On 2015-05-21 06:16, Jeff King wrote:
>>
>>> diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
>>> index f1f2a3f..ffeb03b 100644
>>> --- a/Documentation/git-clone.txt
>>> +++ b/Documentation/git-clone.txt
>>> @@ -107,6 +107,9 @@ objects from the source repository into a pack in
>>> the cloned repository.
>>>  transfer and stop borrowing from them after a clone is made
>>>  by making necessary local copies of borrowed objects.
>>>
>>> +--seed ::
>>> + A convenient shorthand for `--dissociate --reference=`.
>>> +
>>
>> Since you want to advertise this as an easier way than `--dissociate 
>> --reference=`, it might make sense to avoid sending the reader 
>> that way, too.
>>
>> Maybe something like
>>
>> --seed ::
>>Fetch objects from  instead of the clone URL when possible. 
>> This is useful when a (possibly partial) clone already exists locally, to 
>> avoid transferring the same objects again.
>>
> 
> Would it be worth mentioning here that a bundle is a satisfactory
> alternative to repository?
> 
> +--seed ::
> +Fetch objects from  or  instead of the clone
> URL when possible. This is useful when a (possibly partial) clone
> already exists locally, to avoid transferring the same objects again.
> 
> I haven't checked if the invocation would accept a bundle filename,
> but I'm presuming it can in the same way that clone does.

The proof would lie in the pudding ;-) Would you mind testing whether it works 
with bundles?

Ciao,
Dscho
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/3] clone: add `--seed` shorthand

2015-05-21 Thread Philip Oakley

From: "Johannes Schindelin" 

Hi Peff,

On 2015-05-21 06:16, Jeff King wrote:

diff --git a/Documentation/git-clone.txt 
b/Documentation/git-clone.txt

index f1f2a3f..ffeb03b 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -107,6 +107,9 @@ objects from the source repository into a pack in
the cloned repository.
 transfer and stop borrowing from them after a clone is made
 by making necessary local copies of borrowed objects.

+--seed ::
+ A convenient shorthand for `--dissociate --reference=`.
+


Since you want to advertise this as an easier way than 
`--dissociate --reference=`, it might make sense to avoid 
sending the reader that way, too.


Maybe something like

--seed ::
   Fetch objects from  instead of the clone URL when 
possible. This is useful when a (possibly partial) clone already 
exists locally, to avoid transferring the same objects again.




Would it be worth mentioning here that a bundle is a satisfactory 
alternative to repository?


+--seed ::
+Fetch objects from  or  instead of the clone 
URL when possible. This is useful when a (possibly partial) clone 
already exists locally, to avoid transferring the same objects again.


I haven't checked if the invocation would accept a bundle filename, but 
I'm presuming it can in the same way that clone does.


--
Philip 


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/3] clone: add `--seed` shorthand

2015-05-21 Thread Johannes Schindelin
Hi Peff,

On 2015-05-21 06:16, Jeff King wrote:

> diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
> index f1f2a3f..ffeb03b 100644
> --- a/Documentation/git-clone.txt
> +++ b/Documentation/git-clone.txt
> @@ -107,6 +107,9 @@ objects from the source repository into a pack in
> the cloned repository.
>   transfer and stop borrowing from them after a clone is made
>   by making necessary local copies of borrowed objects.
>  
> +--seed ::
> + A convenient shorthand for `--dissociate --reference=`.
> +

Since you want to advertise this as an easier way than `--dissociate 
--reference=`, it might make sense to avoid sending the reader that 
way, too.

Maybe something like

--seed ::
Fetch objects from  instead of the clone URL when possible. 
This is useful when a (possibly partial) clone already exists locally, to avoid 
transferring the same objects again.

Ciao,
Dscho
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html