Skip to content

mrconfig: avoid noise upon bin/update with pre-commit already installed

currently, after the first bin/update run that deploys pre-commit elsewhere, every subsequent bin/update run (or "mr update" in fact) will be noise in the following way:

mr update: /home/zack/dati/projects/sw-heritage/git/swh-environment/swh-search
Already up to date.
Running in migration mode with existing hooks at .git/hooks/pre-commit.legacy
Use -f to use only pre-commit.
pre-commit installed at .git/hooks/pre-commit

with this change we avoid re-running "pre-commit install" if pre-commit has already been installed for a given repo in the past

Test Plan

bin/update


Migrated from D2347 (view on Phabricator)

Merge request reports