fix: Use git command to get the identity

This takes the global git configuration into account, so it will become
unnecessary to set a local identity in every repository.
This commit is contained in:
Akira Komamura 2025-03-03 18:14:42 +09:00
parent a94c4b4ce4
commit 9f5765134b
2 changed files with 3 additions and 12 deletions

View file

@ -145,7 +145,7 @@ class GitRepo:
else:
cmd += ["-a"]
original_user_name = self.repo.config_reader().get_value("user", "name")
original_user_name = self.repo.git.config("--get", "user.name")
original_committer_name_env = os.environ.get("GIT_COMMITTER_NAME")
committer_name = f"{original_user_name} (aider)"