Re: tip wanted: faster git clone

2017-12-09 Thread Matt Wilkie
Thanks Kent. On my desktop depth=500 is 3x longer than 1, but still
mightily tolerable. I didn't test full clone as I know it takes many
minutes on this machine and network connection (edited for brevity):

$ time git clone --depth=1  https://github.com/leo-editor/leo-editor d1
real0m11.494s

$ time git clone --depth=500  https://github.com/leo-editor/leo-editor d500
real0m33.398s

matt

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: tip wanted: faster git clone

2017-12-08 Thread Kent Tenney
Below demonstrates the difference between clone and clone --depth=1
When git trunk is recommended as a good way for users to install and run,
I think --depth=1 would be good to mention, pretty dramatic difference.

ktenney@delly:/tmp$ time git clone --depth=1
https://github.com/leo-editor/leo-editor
Cloning into 'leo-editor'...
remote: Counting objects: 3503, done.
remote: Compressing objects: 100% (3113/3113), done.
remote: Total 3503 (delta 410), reused 2670 (delta 319), pack-reused 0
Receiving objects: 100% (3503/3503), 9.10 MiB | 154.00 KiB/s, done.
Resolving deltas: 100% (410/410), done.

real1m3.407s
user0m2.092s
sys0m0.940s


ktenney@delly:/tmp$ time git clone https://github.com/leo-editor/leo-editor
Cloning into 'leo-editor'...
remote: Counting objects: 121841, done.
remote: Compressing objects: 100% (340/340), done.
remote: Total 121841 (delta 245), reused 203 (delta 69), pack-reused 121432
Receiving objects: 100% (121841/121841), 140.73 MiB | 170.00 KiB/s, done.
Resolving deltas: 100% (94862/94862), done.

real14m24.684s
user1m12.704s
sys0m12.904s


On Thu, Dec 7, 2017 at 10:51 PM, Matt Wilkie  wrote:

> Somebody (Kent?) posted a git clone command that was faster than the
> typical:
>
>  git clone https://github.com/leo-editor/leo-editor.git
>
> I think it involved telling git there was no need to go back to the
> beginning of time, just the previous N months. Or something?
>
> matt
>
> --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to leo-editor+unsubscr...@googlegroups.com.
> To post to this group, send email to leo-editor@googlegroups.com.
> Visit this group at https://groups.google.com/group/leo-editor.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: tip wanted: faster git clone

2017-12-08 Thread Jacob MacDonald
Oh, I didn't realize unshallowing was added! I retract my statement.
Without that feature I find that a repository without history is bad for
development because of the lack of bisect.

On Fri, Dec 8, 2017, 12:50 Matt Wilkie  wrote:

> Thanks Jacob!
>
> It seems that --depth=x  a.k.a. Shallow Clones used to be a problem prior
> to Git v1.9 but are now more fully featured. They're still downplayed in
> "merge-based workflows" but not an actual problem anymore:
> https://stackoverflow.com/questions/6941889/is-it-safe-to-shallow-clone-with-depth-1-create-commits-and-pull-updates-aga
>
> A repo can be started with a shallow clone and full history pulled later
> if needed with (Git 2.8+):
> *git pull --unshallow*
>
> So for Leo's current commit rate a shallow clone with a history of
> ~3-4months would be:
>
> git clone --depth=500
>
> To go back to the last tagged release ask someone who has a clone to
> report result of `git rev-list HEAD ^5.6 --count` (412 at present moment or
> maybe https://github.com/cjlarose/github-rev-list. You could also look at
> the dev*NNN* at https://pypi.python.org/pypi/leo and hazard an estimate.
>
> matt
>
> On Thu, Dec 7, 2017 at 9:01 PM, Jacob MacDonald 
> wrote:
>
>> Check out the documentation for the `--depth` flag to `git-clone`. It
>> will pull only the selected number of commits from a single branch, which
>> means your initial clone is far smaller. However, it makes it very
>> difficult to do development later, so make sure the clone will only be used
>> for reading!
>>
>> Jacob.
>>
>> On Thu, Dec 7, 2017 at 10:51 PM Matt Wilkie  wrote:
>>
>>> Somebody (Kent?) posted a git clone command that was faster than the
>>> typical:
>>>
>>>  git clone https://github.com/leo-editor/leo-editor.git
>>>
>>> I think it involved telling git there was no need to go back to the
>>> beginning of time, just the previous N months. Or something?
>>>
>>> matt
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "leo-editor" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to leo-editor+unsubscr...@googlegroups.com.
>>> To post to this group, send email to leo-editor@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/leo-editor.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "leo-editor" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to leo-editor+unsubscr...@googlegroups.com.
>> To post to this group, send email to leo-editor@googlegroups.com.
>> Visit this group at https://groups.google.com/group/leo-editor.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to leo-editor+unsubscr...@googlegroups.com.
> To post to this group, send email to leo-editor@googlegroups.com.
> Visit this group at https://groups.google.com/group/leo-editor.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: tip wanted: faster git clone

2017-12-08 Thread Matt Wilkie
Thanks Jacob!

It seems that --depth=x  a.k.a. Shallow Clones used to be a problem prior
to Git v1.9 but are now more fully featured. They're still downplayed in
"merge-based workflows" but not an actual problem anymore:
https://stackoverflow.com/questions/6941889/is-it-safe-to-shallow-clone-with-depth-1-create-commits-and-pull-updates-aga

A repo can be started with a shallow clone and full history pulled later if
needed with (Git 2.8+):
*git pull --unshallow*

So for Leo's current commit rate a shallow clone with a history of
~3-4months would be:

git clone --depth=500

To go back to the last tagged release ask someone who has a clone to report
result of `git rev-list HEAD ^5.6 --count` (412 at present moment or maybe
https://github.com/cjlarose/github-rev-list. You could also look at the dev
*NNN* at https://pypi.python.org/pypi/leo and hazard an estimate.

matt

On Thu, Dec 7, 2017 at 9:01 PM, Jacob MacDonald  wrote:

> Check out the documentation for the `--depth` flag to `git-clone`. It will
> pull only the selected number of commits from a single branch, which means
> your initial clone is far smaller. However, it makes it very difficult to
> do development later, so make sure the clone will only be used for reading!
>
> Jacob.
>
> On Thu, Dec 7, 2017 at 10:51 PM Matt Wilkie  wrote:
>
>> Somebody (Kent?) posted a git clone command that was faster than the
>> typical:
>>
>>  git clone https://github.com/leo-editor/leo-editor.git
>>
>> I think it involved telling git there was no need to go back to the
>> beginning of time, just the previous N months. Or something?
>>
>> matt
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "leo-editor" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to leo-editor+unsubscr...@googlegroups.com.
>> To post to this group, send email to leo-editor@googlegroups.com.
>> Visit this group at https://groups.google.com/group/leo-editor.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to leo-editor+unsubscr...@googlegroups.com.
> To post to this group, send email to leo-editor@googlegroups.com.
> Visit this group at https://groups.google.com/group/leo-editor.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: tip wanted: faster git clone

2017-12-08 Thread Zoom.Quiet
if just want pull lasted code
we can base svn got them from githu

On Fri, Dec 8, 2017 at 10:34 PM, Terry Brown  wrote:
> On Fri, 08 Dec 2017 05:01:29 +
> Jacob MacDonald  wrote:
>
>> Check out the documentation for the `--depth` flag to `git-clone`. It
>> will pull only the selected number of commits from a single branch,
>> which means your initial clone is far smaller. However, it makes it
>> very difficult to do development later, so make sure the clone will
>> only be used for reading!
>>
>> Jacob.
>
> Just out of interest, why is it harder to do development later?
> Obviously you don't have the history to inspect, but other than that,
> you can still add commits and, I would assume, push back to the origin?
> Just curious.
>
> Cheers -Terry
>
> --
> You received this message because you are subscribed to the Google Groups 
> "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to leo-editor+unsubscr...@googlegroups.com.
> To post to this group, send email to leo-editor@googlegroups.com.
> Visit this group at https://groups.google.com/group/leo-editor.
> For more options, visit https://groups.google.com/d/optout.



-- 
life is pathetic, go Pythonic! 人生苦短, Python当歌!
俺: http://zoomquiet.io
授: http://creativecommons.org/licenses/by-sa/2.5/cn/
怒: 冗余不做,日子甭过!备份不做,十恶不赦!
KM keep growing environment culture which promoting organization learning!

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: tip wanted: faster git clone

2017-12-08 Thread Terry Brown
On Fri, 08 Dec 2017 05:01:29 +
Jacob MacDonald  wrote:

> Check out the documentation for the `--depth` flag to `git-clone`. It
> will pull only the selected number of commits from a single branch,
> which means your initial clone is far smaller. However, it makes it
> very difficult to do development later, so make sure the clone will
> only be used for reading!
> 
> Jacob.

Just out of interest, why is it harder to do development later?
Obviously you don't have the history to inspect, but other than that,
you can still add commits and, I would assume, push back to the origin?
Just curious.

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: tip wanted: faster git clone

2017-12-07 Thread Jacob MacDonald
Check out the documentation for the `--depth` flag to `git-clone`. It will
pull only the selected number of commits from a single branch, which means
your initial clone is far smaller. However, it makes it very difficult to
do development later, so make sure the clone will only be used for reading!

Jacob.

On Thu, Dec 7, 2017 at 10:51 PM Matt Wilkie  wrote:

> Somebody (Kent?) posted a git clone command that was faster than the
> typical:
>
>  git clone https://github.com/leo-editor/leo-editor.git
>
> I think it involved telling git there was no need to go back to the
> beginning of time, just the previous N months. Or something?
>
> matt
>
> --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to leo-editor+unsubscr...@googlegroups.com.
> To post to this group, send email to leo-editor@googlegroups.com.
> Visit this group at https://groups.google.com/group/leo-editor.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


tip wanted: faster git clone

2017-12-07 Thread Matt Wilkie
Somebody (Kent?) posted a git clone command that was faster than the
typical:

 git clone https://github.com/leo-editor/leo-editor.git

I think it involved telling git there was no need to go back to the
beginning of time, just the previous N months. Or something?

matt

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.