From 8b768d848492c4f7995099e3beeb0fee15406dc1 Mon Sep 17 00:00:00 2001
From: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Date: Wed, 19 Nov 2014 16:24:19 +0100
Subject: [PATCH] generalize the file watch feature

it will also be used for watching .ui files.

Change-Id: I74cddca1dcdc8661d397a3f6af814d97a13d4ebd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
---
 git-hooks/sanitize-commit | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/git-hooks/sanitize-commit b/git-hooks/sanitize-commit
index 9160f7e..5963e08 100755
--- a/git-hooks/sanitize-commit
+++ b/git-hooks/sanitize-commit
@@ -41,10 +41,10 @@ if (defined $config{flags}) {
         $cfg{$c} = 1;
     }
 }
-my (%watch_files, %watch_people);
+my (%watch_files, %watch_messages);
 for my $key (keys %config) {
     $watch_files{$1} = $config{$key} if ($key =~ /^watches\.([^.]+)\.files/);
-    $watch_people{$1} = $config{$key} if ($key =~ /^watches\.([^.]+)\.people/);
+    $watch_messages{$1} = $config{$key} if ($key =~ /^watches\.([^.]+)\.message/);
 }
 my $fail = 0;
 my $file = "";
@@ -569,7 +569,7 @@ while (<DIFF>) {
             $qmake = ($file =~ /\.pr[filo]$/i);
             for my $key (keys %watch_files) {
                 if ($file =~ /^$watch_files{$key}$/) {
-                    complain("Changing this file is risky. Please add $watch_people{$key} as reviewer(s).", "", -1);
+                    complain($watch_messages{$key}, "", -1);
                 }
             }
             my $foreign = ($file =~ /(^|\/)3rdparty\//);
-- 
GitLab