diff --git a/aider/repo.py b/aider/repo.py index f14f17403..e4597c8e4 100644 --- a/aider/repo.py +++ b/aider/repo.py @@ -165,7 +165,7 @@ class GitRepo: - --attribute-author: Modify Author name to "User Name (aider)". - --attribute-committer: Modify Committer name to "User Name (aider)". - --attribute-co-authored-by: Add - "Co-authored-by: aider () " trailer to commit message. + "Co-authored-by: aider () " trailer to commit message. Behavior Summary: @@ -249,9 +249,7 @@ class GitRepo: model_name = "unknown-model" if coder and hasattr(coder, "main_model") and coder.main_model.name: model_name = coder.main_model.name - commit_message_trailer = ( - f"\n\nCo-authored-by: aider ({model_name}) " - ) + commit_message_trailer = f"\n\nCo-authored-by: aider ({model_name}) " # Determine if author/committer names should be modified # Author modification applies only to aider edits. diff --git a/tests/basic/test_repo.py b/tests/basic/test_repo.py index 0f72c6763..71ba94798 100644 --- a/tests/basic/test_repo.py +++ b/tests/basic/test_repo.py @@ -300,7 +300,7 @@ class TestRepo(unittest.TestCase): # check the commit message and author/committer commit = raw_repo.head.commit - self.assertIn("Co-authored-by: aider (gpt-test) ", commit.message) + self.assertIn("Co-authored-by: aider (gpt-test) ", commit.message) self.assertEqual(commit.message.splitlines()[0], "Aider edit") # With default (None), co-authored-by takes precedence self.assertEqual( @@ -355,7 +355,7 @@ class TestRepo(unittest.TestCase): # check the commit message and author/committer commit = raw_repo.head.commit self.assertIn( - "Co-authored-by: aider (gpt-test-combo) ", commit.message + "Co-authored-by: aider (gpt-test-combo) ", commit.message ) self.assertEqual(commit.message.splitlines()[0], "Aider combo edit") # When co-authored-by is true BUT author/committer are explicit True,