From 551a8b0bd48fea74fdf6ddc0dbc468acaaf1f884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Mon, 22 Mar 2021 22:51:31 +0100 Subject: [PATCH] Add instructions for other repos to pre-commit hook --- scripts/git/pre-commit | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/git/pre-commit b/scripts/git/pre-commit index d892c883e177..2624b25a1fd7 100755 --- a/scripts/git/pre-commit +++ b/scripts/git/pre-commit @@ -6,8 +6,11 @@ # Only staged files (the ones to be committed) are being processed, but each file is checked # entirely as it is stored on disc, even parts that are not staged. # -# To use this script, it needs to be installed in the local git repository. For example by running -# `ln -s scripts/git/pre-commit .git/hooks` in the root folder. +# To use this script, install it in the local git repository. +# +# `curl -sL https://github.com/crystal-lang/crystal/raw/master/scripts/git/pre-commit > .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit`. +# +# Alternatively, in the Crystal repo you can directly link it: `ln -s scripts/git/pre-commit .git/hooks`. # # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if