Use set rather than list for commit message related stages, remove

default file open modes, tidy up bash call for failing hook test
This commit is contained in:
Marc Jay 2019-04-21 21:58:01 +01:00
parent 64467f6ab9
commit 82969e4ba3
4 changed files with 5 additions and 5 deletions

View file

@ -190,7 +190,7 @@ def _compute_cols(hooks, verbose):
def _all_filenames(args):
if args.origin and args.source:
return git.get_changed_files(args.origin, args.source)
elif args.hook_stage in ['prepare-commit-msg', 'commit-msg']:
elif args.hook_stage in {'prepare-commit-msg', 'commit-msg'}:
return (args.commit_msg_filename,)
elif args.files:
return args.files