Skip to content

Commit 248706d

Browse files
PeterDaveHelloljharb
authored andcommitted
[New] Clean up git reflog history before git gc
1 parent ab591b0 commit 248706d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

install.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ install_nvm_from_git() {
125125
fi
126126

127127
echo "=> Compressing and cleaning up git repository"
128+
if ! command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" reflog expire --expire=now --all; then
129+
echo >&2 "Your version of git is out of date. Please update it!"
130+
fi
128131
if ! command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" gc --auto --aggressive --prune=now ; then
129132
echo >&2 "Your version of git is out of date. Please update it!"
130133
fi

0 commit comments

Comments
 (0)