From 248706d5f854550fb0c0bdf657ede80b95ad6d29 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Fri, 14 Jul 2017 00:37:58 +0800 Subject: [PATCH] [New] Clean up git reflog history before git gc --- install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install.sh b/install.sh index 57fe6c5..04094e2 100755 --- a/install.sh +++ b/install.sh @@ -125,6 +125,9 @@ install_nvm_from_git() { fi echo "=> Compressing and cleaning up git repository" + if ! command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" reflog expire --expire=now --all; then + echo >&2 "Your version of git is out of date. Please update it!" + fi if ! command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" gc --auto --aggressive --prune=now ; then echo >&2 "Your version of git is out of date. Please update it!" fi