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

Manually run git gc after nvm installation, fix #1226 #1231

Merged
merged 1 commit into from
Sep 17, 2016

Conversation

PeterDaveHello
Copy link
Collaborator

No description provided.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM pending question

@@ -109,6 +109,11 @@ install_nvm_from_git() {
command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" branch -D master >/dev/null 2>&1
fi
fi

echo "=> Compressing and cleaning up git repository"
if ! command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" gc --aggressive --prune=now ; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you confirm that this command works in git 1.5.5?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reminding.
git v1.5.5 does not support --prune with value, the interesting thing is the git gc --aggressive return Nothing new to pack., so give an upgrade request may be a better workaround.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So to clarify - at what version does this command begin returning zero (either providing the desired behavior, or doing a no-op)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fine from v1.6.2

* "git gc --prune" was resurrected to allow "git gc --no-prune" and
  giving non-default expiration period e.g. "git gc --prune=now".

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be related to #1232

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we don't have the problem here now since #1233 was merged!

@ljharb ljharb added the installing nvm Problems installing nvm itself label Sep 17, 2016
@ljharb ljharb self-assigned this Sep 17, 2016
@ljharb ljharb merged commit 68761c3 into nvm-sh:master Sep 17, 2016
@PeterDaveHello PeterDaveHello deleted the git-gc-after-installation branch September 17, 2016 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installing nvm Problems installing nvm itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants