From 4cc3ef1181e2b3695146fe8d44574e094b5ddede Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jul 17 2014 08:27:05 +0000 Subject: if PROGIT_CONFIG is not defined and /etc/progit/progit.cfg exists, use it --- diff --git a/progit/hooks/files/progit_hook.py b/progit/hooks/files/progit_hook.py index 5bdc1c6..9fef36e 100644 --- a/progit/hooks/files/progit_hook.py +++ b/progit/hooks/files/progit_hook.py @@ -11,6 +11,12 @@ import sys import subprocess +if 'PROGIT_CONFIG' not in os.environ \ + and os.path.exists('/etc/progit/progit.cfg'): + print 'Using configuration file `/etc/progit/progit.cfg`' + os.environ['PROGIT_CONFIG'] = '/etc/progit/progit.cfg' + + FIXES = [ re.compile('fixe[sd]?:? #(\d+)', re.I), re.compile('.*\s+fixe[sd]?:? #(\d+)', re.I),