Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(init): shallow clone and reduce verbosity #129

Merged
merged 2 commits into from
Nov 16, 2019

Conversation

curbengh
Copy link
Contributor

@curbengh curbengh commented Nov 5, 2019

  • git:

    • --recursive has been deprecated in git 2.13, --recurse-submodules is available in git 2.3 (possibly available in older version).
    • --depth=1 for shallow clone the hexo-starter, resulting in faster and smaller clone.
  • yarn and npm:

    • ignore optional dependencies
  • Reduce verbosity for all commands.

from

$ hexo init
INFO  Cloning hexo-starter https://github.com/hexojs/hexo-starter.git
Cloning into 'test'...
remote: Enumerating objects: 14, done.
remote: Counting objects: 100% (14/14), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 14 (delta 0), reused 11 (delta 0), pack-reused 0
Unpacking objects: 100% (14/14), done.
Submodule 'themes/landscape' (https://github.com/hexojs/hexo-theme-landscape.git) registered for path 'themes/landscape'
Cloning into 'test/themes/landscape'...
remote: Enumerating objects: 32, done.        
remote: Counting objects: 100% (32/32), done.        
remote: Compressing objects: 100% (25/25), done.        
Receiving objects: 100% (1054/1054), 3.21 MiB | 425.00 KiB/s, done.
remote: Total 1054 (delta 20), reused 10 (delta 7), pack-reused 1022        
Resolving deltas: 100% (578/578), done.
Submodule path 'themes/landscape': checked out '73a23c51f8487cfcd7c6deec96ccc7543960d350'
INFO  Install dependencies
INFO  Start blogging with Hexo!

to

$ hexo init
INFO  Cloning hexo-starter https://github.com/hexojs/hexo-starter.git
INFO  Install dependencies
INFO  Start blogging with Hexo!

Ref: git, yarn, npm.

@curbengh curbengh requested a review from a team November 5, 2019 04:50
@curbengh
Copy link
Contributor Author

curbengh commented Nov 5, 2019

It's a major (non-breaking) change, perhaps more eyeball from @hexojs/core .

@tomap
Copy link
Contributor

tomap commented Nov 5, 2019

LGTM. Maybe add a prerequisite on the git version required in the readme?

@SukkaW
Copy link
Member

SukkaW commented Nov 5, 2019

@tomap @curbengh Maybe even a git version check when hexo init in a separate PR.

@SukkaW SukkaW merged commit 4cec9ac into hexojs:master Nov 16, 2019
@curbengh curbengh deleted the shallow-quiet branch November 17, 2019 03:42
@curbengh
Copy link
Contributor Author

LGTM. Maybe add a prerequisite on the git version required in the readme?

recurse-submodules has been available since git 1.8.0, which is even older than the version (git 2.1.0) used in Debian Jessie.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants