Commit graph

159 commits

Author SHA1 Message Date
Paul Gauthier
bd012d63e9 catch git errors for commit and diff 2024-09-02 11:02:33 -07:00
Paul Gauthier
5781f91649 refactor: consolidate git error handling with ANY_GIT_ERROR constant 2024-08-31 08:41:32 -07:00
Paul Gauthier
5a6f7b3cd1 catch all git errors 2024-08-31 08:36:00 -07:00
Paul Gauthier
72c9ac460b catch all git.exc.ODBError 2024-08-31 08:24:53 -07:00
Paul Gauthier
c32a991b2c use git.exc not gitdb.exc 2024-08-31 08:21:07 -07:00
Paul Gauthier
3b9e000892 get_head* -> get_head_commit* 2024-08-31 07:35:55 -07:00
Paul Gauthier
d2acb9c3b0 use safe repo.get_head methods 2024-08-31 07:34:18 -07:00
Paul Gauthier
2999c64435 refactor: simplify error handling for tracked files count 2024-08-30 07:47:50 -07:00
Paul Gauthier (aider)
303a314c5e refactor: wrap entire get_tracked_files method in try/except block 2024-08-30 07:45:56 -07:00
Paul Gauthier (aider)
c97f699492 refactor: move UnableToCountRepoFiles to repo.py and raise from get_tracked_files 2024-08-30 07:44:04 -07:00
Paul Gauthier (aider)
50c987e261 style: Simplify function call 2024-08-23 14:18:38 -07:00
Paul Gauthier (aider)
12551c9563 feat: add extra_headers to commit message generation 2024-08-23 14:18:35 -07:00
Paul Gauthier (aider)
e3ad45f34e feat: change attribute_commit_message to attribute_commit_message_author 2024-08-10 11:08:39 -07:00
Paul Gauthier (aider)
0666b5f971 feat: add attribute_commit_message_committer param to prepend "aider: " to every commit message 2024-08-10 11:06:21 -07:00
Paul Gauthier
8769f31640 fix: Handle empty commit history in cmd_diff 2024-08-10 09:11:16 -07:00
Paul Gauthier (aider)
ca9ef60ede feat: Add GitRepo.get_head() method 2024-08-09 19:41:19 -04:00
Paul Gauthier
9cf672b428 fix: Add bold formatting to announcement messages
feat: Add bold formatting to commit message output
refactor: Simplify tool_output method in io.py
2024-08-09 19:26:22 -04:00
Paul Gauthier
72572f06d9 fix: Improve commit message generation by handling large diffs 2024-08-07 07:45:22 -03:00
Paul Gauthier (aider)
b6994aacee fix: Normalize current working directory in ignored_file_raw method 2024-08-06 10:25:27 -03:00
Paul Gauthier
4d0934f0a8 fix subtree logic for windows 2024-08-06 10:01:23 -03:00
Paul Gauthier
768d7af32e fix normlize_path logic 2024-08-06 09:38:51 -03:00
Paul Gauthier
4e5e9b4a1a fix: move dict init into __init__ 2024-08-06 09:34:25 -03:00
Paul Gauthier
152188389c fix 2024-08-06 08:32:48 -03:00
Paul Gauthier
793035b2e0 improve perf of repomap and other file intensive actions 2024-08-05 16:05:19 -03:00
Paul Gauthier
da3e507ec4 Revert "rename simple_send_with_retries -> send_with_retries"
This reverts commit d619edf6e9.
2024-08-02 10:49:44 -03:00
Paul Gauthier
d619edf6e9 rename simple_send_with_retries -> send_with_retries 2024-08-02 10:35:10 -03:00
Paul Gauthier (aider)
ca0ee9e9ba style: Fix import order in aider/repo.py 2024-08-01 17:19:31 -03:00
Paul Gauthier (aider)
a36861a01a refactor: Implement once-per-second check for aider ignore file 2024-08-01 17:19:27 -03:00
Paul Gauthier
33ff801f82 feat: Add refresh_aider_ignore method to GitRepo class 2024-08-01 17:19:26 -03:00
Paul Gauthier
103452aa21 fix: Remove unnecessary file caching and simplify subtree-only check 2024-08-01 16:37:38 -03:00
Paul Gauthier (aider)
24aa48198b fix: Use os.path.commonpath() to check if fname_path is below cwd_path 2024-08-01 16:28:10 -03:00
Paul Gauthier
f26862d92c fix: Add caching and logging for ignored file checks 2024-08-01 16:28:09 -03:00
Paul Gauthier (aider)
1c6cdb97ae refactor: Split ignored_file into ignored_file and ignored_file_raw 2024-08-01 16:25:41 -03:00
Paul Gauthier
17e2c02a47 fix: Improve handling of ignored files in GitRepo class 2024-08-01 16:25:40 -03:00
Paul Gauthier
f458fa86ac feat: implement caching for ignored files in GitRepo class 2024-08-01 16:02:53 -03:00
Paul Gauthier (aider)
b8dfb18aa9 feat: Add subtree_only attribute to GitRepo class 2024-08-01 15:57:43 -03:00
Paul Gauthier (aider)
d05f1e6446 feat: Add subtree_only functionality to GitRepo class 2024-08-01 15:56:45 -03:00
Paul Gauthier (aider)
1275171b90 feat: add support for the new commit_prompt arg to override prompts.commit_system
The GitRepo class in the aider/repo.py file has been updated to support a new `commit_prompt` argument. This allows overriding the default `prompts.commit_system` when generating commit messages.

The changes include:

1. Adding the `commit_prompt` parameter to the `__init__` method of the `GitRepo` class.
2. Storing the `commit_prompt` value in the `self.commit_prompt` attribute.
3. Modifying the `get_commit_message` method to use the `self.commit_prompt` value if it's provided, otherwise falling back to the default `prompts.commit_system`.

This change provides more flexibility in customizing the commit message generation process, allowing users to provide their own custom prompts if needed.
2024-07-31 09:47:49 -03:00
Paul Gauthier
16856bb4ca Give the commit message model the chat context #748 2024-06-30 13:02:23 -07:00
Paul Gauthier
9c214e0faf Implemented option to attribute commit messages in GitRepo class. 2024-06-27 10:21:04 -07:00
Paul Gauthier
34e83f9580 Implemented commit message attribution for Aider-generated edits. 2024-06-27 10:19:42 -07:00
Paul Gauthier
c207c7839a Added --attribute-author/committer options #698 2024-06-21 17:14:21 -07:00
Paul Gauthier
9e228670a2 append (aider) to author if aider wrote the code 2024-06-18 11:18:52 -07:00
Paul Gauthier
5a3627de6e finish removing aider: prefix 2024-06-18 08:37:13 -07:00
Paul Gauthier
0cc00f2a1e Removed setting and restoring GIT_COMMITTER_NAME in GitRepo class. 2024-06-18 08:15:02 -07:00
Paul Gauthier
40c28ff7d8 aider: Set committer name to include "aider" and restore original committer name after commit. 2024-06-18 08:11:54 -07:00
Paul Gauthier
01242b256c Set committer name to include "aider" and restore original committer name after commit. 2024-06-18 08:11:53 -07:00
Paul Gauthier
6216a273fe drop context at the caller 2024-06-11 13:33:46 -07:00
Paul Gauthier
20f730a673 stop including chat conversation in commits 2024-06-11 13:19:02 -07:00
Paul Gauthier
7b8e603249 aider: Shortened the docstring in aider/repo.py to comply with the 100 characters line length limit.
# Aider chat conversation:

USER: I ran this command:

 pre-commit run --files aider/repo.py

And got this output:

isort....................................................................Passed
black....................................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

aider/repo.py:247:101: E501 line too long (111 > 100 characters)
        """
        Returns a list of all files which are dirty (not committed), either staged or in the working directory.
        """

                                                                                        ^

ASSISTANT: Please add the file `aider/repo.py` to the chat so I can make the necessary changes.

USER: I added these files to the chat: aider/repo.py

ASSISTANT: To fix the flake8 error, we need to shorten the docstring to comply with the line length limit of 100 characters.

Here is the *SEARCH/REPLACE* block:

aider/repo.py
```python
<<<<<<< SEARCH
        """
        Returns a list of all files which are dirty (not committed), either staged or in the working directory.
        """
=======
        """
        Returns a list of all files which are dirty (not committed), either staged or in the working
        directory.
        """
>>>>>>> REPLACE
```
2024-05-18 18:30:51 -07:00