#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys

from get_msg import match_msg

# Collect the parameters
commit_msg_filepath = sys.argv[1]
if len(sys.argv) > 2:
    commit_type = sys.argv[2]
else:
    commit_type = ''
if len(sys.argv) > 3:
    commit_hash = sys.argv[3]
else:
    commit_hash = ''

# print('prepare-commit-msg: File: {}\nType: {}\nHash: {}'.format(
#     commit_msg_filepath,
#     commit_type,
#     commit_hash,
# ))

match_msg(commit_msg_filepath, commit_type)
