diff --git a/homu/main.py b/homu/main.py index e90723b..bbd36d5 100644 --- a/homu/main.py +++ b/homu/main.py @@ -1027,6 +1027,12 @@ def create_merge(state, repo_cfg, branch, logger, git_cfg, ok = False if state.squash: try: + commiter_name = subprocess.check_output( + git_cmd('log', '-1', '--format="%an"', + state.head_sha)).decode('ascii').strip() + commiter_email = subprocess.check_output( + git_cmd('log', '-1', '--format="%ae"', + state.head_sha)).decode('ascii').strip() merge_base_sha = subprocess.check_output( git_cmd( 'merge-base', @@ -1038,9 +1044,9 @@ def create_merge(state, repo_cfg, branch, logger, git_cfg, merge_base_sha)) utils.logged_call(git_cmd( '-c', - 'user.name=' + git_cfg['name'], + 'user.name=' + commiter_name, '-c', - 'user.email=' + git_cfg['email'], + 'user.email=' + commiter_email, 'commit', '-m', squash_msg))