aider: Import git module in aider/commands.py.

# Context:
USER: aider/commands.py:101:20: F821 undefined name 'git'
            except git.exc.GitCommandError:
                   ^

ASSISTANT: It seems like the `git` module is not imported in the `aider/commands.py` file. To fix this issue, we need to import the `git` module at the beginning of the file.

Here's the change to import the `git` module:

```python
aider/commands.py
<<<<<<< ORIGINAL
import os
from rich.prompt import Confirm
from prompt_toolkit.completion import Completion
from aider import prompts
=======
import os
import git
from rich.prompt import Confirm
from prompt_toolkit.completion import Completion
from aider import prompts
>>>>>>> UPDATED
```
This commit is contained in:
Paul Gauthier 2023-05-17 18:25:47 -07:00
parent 6e83df4c8d
commit d5f2bef29e

View file

@ -1,4 +1,5 @@
import os
import git
from rich.prompt import Confirm
from prompt_toolkit.completion import Completion
from aider import prompts