Page MenuHomeSoftware Heritage

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

Authored by zack on Nov 24 2019, 1:51 PM.

Details

Summary

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

Diff Detail

Repository
rDENV Development environment
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.