mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 12:24:59 +00:00
aider: Set the git user name and email in the get_tracked_files
test.
# Aider chat conversation: USER: set the git user name and email in the `get_tracked_files` test ASSISTANT: To set the git user name and email in the `get_tracked_files` test, we need to modify the `tests/test_coder.py` file. We will add two lines of code to set the git user name and email after initializing the git repository. Here is the change: ```python tests/test_coder.py <<<<<<< ORIGINAL # Initialize a git repository in the temporary directory repo = git.Repo.init(tempdir) ======= # Initialize a git repository in the temporary directory and set user name and email repo = git.Repo.init(tempdir) repo.config_writer().set_value("user", "name", "Test User").release() repo.config_writer().set_value("user", "email", "testuser@example.com").release() >>>>>>> UPDATED ``` This change sets the git user name to "Test User" and the email to "testuser@example.com".
This commit is contained in:
parent
8d5f17898a
commit
3e3694b38a
1 changed files with 3 additions and 1 deletions
|
@ -364,8 +364,10 @@ class TestCoder(unittest.TestCase):
|
|||
# Create a temporary directory
|
||||
tempdir = Path(tempfile.mkdtemp())
|
||||
|
||||
# Initialize a git repository in the temporary directory
|
||||
# Initialize a git repository in the temporary directory and set user name and email
|
||||
repo = git.Repo.init(tempdir)
|
||||
repo.config_writer().set_value("user", "name", "Test User").release()
|
||||
repo.config_writer().set_value("user", "email", "testuser@example.com").release()
|
||||
|
||||
# Create three empty files and add them to the git repository
|
||||
filenames = ["README.md", "subdir/fänny.md", "systemüber/blick.md", 'file"with"quotes.txt']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue