Fixed bug identifying 'commit-msg' files.

There was a minor typo that would cause repo to (I believe)
mistakenly identify any file that contained a substring of the
word 'commit-msg' as a commit message hook.  For example, the file
'mit' or the file 'msg' would be treated as a commit message hook.
I believe that it was intended that repo only recognize files
named exactly 'commit-msg'.

Change-Id: I93edbddf3da3cf0935641e6efb19b0a8ee6e2308
This commit is contained in:
Doug Anderson 2011-01-10 12:38:37 -08:00 committed by Shawn O. Pearce
parent 0ce6ca9c7b
commit 2536f80625

View File

@ -1195,7 +1195,7 @@ class Project(object):
for stock_hook in repo_hooks():
name = os.path.basename(stock_hook)
if name in ('commit-msg') and not self.remote.review:
if name in ('commit-msg',) and not self.remote.review:
# Don't install a Gerrit Code Review hook if this
# project does not appear to use it for reviews.
#