mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-22 05:14:59 +00:00
test: cover user commit with no committer attribution
Co-authored-by: aider (vertex_ai/gemini-2.5-pro-exp-03-25) <noreply@aider.dev>
This commit is contained in:
parent
37a252748a
commit
d991cb6721
1 changed files with 9 additions and 0 deletions
|
@ -223,6 +223,15 @@ class TestRepo(unittest.TestCase):
|
|||
original_author_name = os.environ.get("GIT_AUTHOR_NAME")
|
||||
self.assertIsNone(original_author_name)
|
||||
|
||||
# Test user commit with explicit no-committer attribution
|
||||
git_repo_user_no_committer = GitRepo(io, None, None, attribute_committer=False)
|
||||
fname.write_text("user no committer content")
|
||||
commit_result = git_repo_user_no_committer.commit(fnames=[str(fname)], aider_edits=False)
|
||||
self.assertIsNotNone(commit_result)
|
||||
commit = raw_repo.head.commit
|
||||
self.assertEqual(commit.author.name, "Test User") # Author never modified for user commits
|
||||
self.assertEqual(commit.committer.name, "Test User") # Explicit False prevents modification
|
||||
|
||||
def test_commit_with_co_authored_by(self):
|
||||
# Cleanup of the git temp dir explodes on windows
|
||||
if platform.system() == "Windows":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue