Add support for commit-msg git hook

This commit is contained in:
Anthony Sottile 2017-07-22 15:16:12 -07:00
parent a6a4762f0d
commit d0b268c813
9 changed files with 107 additions and 57 deletions

View file

@ -58,6 +58,9 @@ def get_filenames(args, include_expr, exclude_expr):
getter = git.get_files_matching(
lambda: get_changed_files(args.origin, args.source),
)
elif args.hook_stage == 'commit-msg':
def getter(*_):
return (args.commit_msg_filename,)
elif args.files:
getter = git.get_files_matching(lambda: args.files)
elif args.all_files: