Closed shadmansaleh closed 3 years ago
Yeah I thought about that previously, but I am not sure it can be done?
I can remove the current files but you'll always get them pulled down with history anyway, and filter-branch
ing the whole project isn't really viable since it's a destructive action, afaik.
It also makes submitting "made with lush" screenshots a bit harder though I guess I could manually merge them externally (not like a ton of people share their lush themes though).
Removing the current demo gifs saves 900k which isn't nothing but it's also not ... much? (I say this with bad internet.) Total clone weight is 3.575M (clone comes down compressed).
I wonder if git has a git clone --shallow
kind of option where it only pulls HEAD.
Not against the idea, just... not sure how much it will do for you.
Cloning out git clone -b medialess --single-branch https://github.com/rktmjp/lush.nvim
has the same payload size, since the history is the same, which is obvious in hindsight when remembering how git works.
Open to suggestions if there is a solution.
~/scratch
λ ifstat; git clone -b medialess --single-branch --depth 1 https://github.com/rktjmp/lush.nvim; ifstat
#kernel
Interface RX Pkts/Rate TX Pkts/Rate RX Data/Rate TX Data/Rate
RX Errs/Drop TX Errs/Drop RX Over/Rate TX Coll/Rate
lo 79 0 79 0 26844 0 26844 0
0 0 0 0 0 0 0 0
eno1 3753 0 2575 0 4369K 0 278170 0
0 0 0 0 0 0 0 0
docker0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
Cloning into 'lush.nvim'...
remote: Enumerating objects: 88, done.
remote: Counting objects: 100% (88/88), done.
remote: Compressing objects: 100% (63/63), done.
remote: Total 88 (delta 10), reused 53 (delta 5), pack-reused 0
Receiving objects: 100% (88/88), 65.42 KiB | 1.92 MiB/s, done.
Resolving deltas: 100% (10/10), done.
#kernel
Interface RX Pkts/Rate TX Pkts/Rate RX Data/Rate TX Data/Rate
RX Errs/Drop TX Errs/Drop RX Over/Rate TX Coll/Rate
lo 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
eno1 80 0 73 0 85395 0 6858 0
0 0 0 0 0 0 0 0
docker0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
If you use --depth 1
you only get the latest revision, I assume later pulls come in ok. Wonder if packer supports such an option? It's probably widely useful for any repo you only expect to pull into.
Basically all plugin managers make shallow clones including packer . There's an option to set depth too . You won;t have to rewrite histroy for entire repo . Just updating current main branch would improve a lot.
Yep just saw that. It claims the default depth is 1 too.
Ok sounds good, I'll shuffle stuff around.
Also made with lush won't be complicated I think . We use links for themes.md in lualine . Haven't yet had to teach any one how to upload an image :)
I think there's something about the regional github server I access . When cloning large repos with lots of small files it clones without an issue but when cloning bigger files it just crawls :D
:tada:
Better?
Better?
Definatly . Thanks for quick solution :) Also I didn't think of using a separate branch before it's a better idea then uploading to github.
Currently about 90% of space in repo is media (mainly /images containing gifs for README & Images of themes in /made_with_lush/) without counting
.git/
which contains at lest another copy of those media.These can be uploaded to github or some other host and the README can use links. That makes the repo lighter and instalation faster .
(It just bugs me seeing media taking most of the instalation & Packer just timed out 3 times before installing ðŸ˜)