diff --git a/forwardport/models/project.py b/forwardport/models/project.py index 18d62207..46c7c0fc 100644 --- a/forwardport/models/project.py +++ b/forwardport/models/project.py @@ -702,6 +702,7 @@ More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port conf = working_copy.with_config(env={ **to_dict('AUTHOR', author), **to_dict('COMMITTER', committer), + 'GIT_COMMITTER_DATE': '', }) # squash to a single commit conf.reset('--soft', root_commits[0]['parents'][0]['sha']) @@ -759,7 +760,6 @@ stderr: 'GIT_AUTHOR_DATE': cm['author']['date'], 'GIT_COMMITTER_NAME': cm['committer']['name'], 'GIT_COMMITTER_EMAIL': cm['committer']['email'], - 'GIT_COMMITTER_DATE': cm['committer']['date'], }) conf = configured.with_config(stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=False) diff --git a/forwardport/tests/test_simple.py b/forwardport/tests/test_simple.py index fbc4fc81..f5e6de14 100644 --- a/forwardport/tests/test_simple.py +++ b/forwardport/tests/test_simple.py @@ -389,7 +389,9 @@ def test_conflict(env, config, make_repo): p = prod.commit(p_0) c = prod.commit(pr1.head) assert c.author == p.author - assert c.committer == p.committer + # ignore date as we're specifically not keeping the original's + without_date = itemgetter('name', 'email') + assert without_date(c.committer) == without_date(p.committer) assert prod.read_tree(c) == { 'f': 'c', 'g': re_matches(r'''<<<\x3c<<< HEAD