From 6ef360e388da319909c3c6d7a3e4c18a54f80abd Mon Sep 17 00:00:00 2001 From: Stefan Kanev Date: Tue, 26 Jan 2021 22:39:17 +0200 Subject: [PATCH] git-hooks; don't touch commit --amend message --- git-hooks/prepare-commit-msg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git-hooks/prepare-commit-msg b/git-hooks/prepare-commit-msg index 4802a3be..fde92ae3 100755 --- a/git-hooks/prepare-commit-msg +++ b/git-hooks/prepare-commit-msg @@ -2,6 +2,8 @@ message = File.read(ARGV[0]) +exit 0 unless message.start_with? "\n" + prefixes = [ [%r{^other/clrs/(\d+)/(\d+)/(\d+)\.}, -> { "clrs; exercise #{$1.to_i}.#{$2.to_i}.#{$3.to_i} – " }], [%r{^other/clrs/(\d+)/problems/(\d+)\.}, -> {