Running the setup multiple times was failing on High Sierra. First run was fine, subsequent runs are failing due to $HOME/workspace/git-hooks-core being present already. Also, we were littering the git config with multiple core.hookspath values pointing to that directory.
Changed the script scripts/common/git.shso that it :
only clones the pivotal-cf/git-hooks-core repo on the first run
only adds the git config core.hookspath on the first run
on subsequent runs, pulls the latest changes
Note: one assumption we made is that you will not be changing the git-hooks-core repo locally ; this is why we allow a git pull -r on it.
Running the setup multiple times was failing on High Sierra. First run was fine, subsequent runs are failing due to
$HOME/workspace/git-hooks-core
being present already. Also, we were littering the git config with multiplecore.hookspath
values pointing to that directory.Changed the script
scripts/common/git.sh
so that it :Note: one assumption we made is that you will not be changing the git-hooks-core repo locally ; this is why we allow a git pull -r on it.