From 68761c32001b52b8f5769c2a848dbe3c4e57659d Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Sat, 17 Sep 2016 08:51:50 +0800 Subject: [PATCH] Manually run git gc after nvm installation, fix #1226 --- install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install.sh b/install.sh index 0ecfcde..9fae7af 100755 --- a/install.sh +++ b/install.sh @@ -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 + echo >&2 "Your version of git is out of date. Please update it!" + fi return }