From 1ed2eefff4451a5b11cd16d40fa23c59c9fc55db Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 25 Oct 2024 09:38:10 -0700 Subject: [PATCH 1/3] copy --- aider/website/docs/git.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/aider/website/docs/git.md b/aider/website/docs/git.md index 20712b72f..9679b2ea8 100644 --- a/aider/website/docs/git.md +++ b/aider/website/docs/git.md @@ -22,9 +22,16 @@ This keeps your edits separate from aider's edits, and makes sure you never lose ## In-chat commands -Aider also allows you to use in-chat commands to `/diff` or `/undo` the last change. -To do more complex management of your git history, you cat use raw `git` commands, -either by using `/git` within the chat, or with standard git tools outside of aider. +Aider also allows you to use +[in-chat commands](/docs/usage/commands.html) +to perform git operations: + +- `/diff` will show all the file changes since the last message you sent. +- `/undo` will undo and discard the last change. +- `/commit` to commit all dirty changes with a sensible commit message. +- `/git` will let you run raw git commands to do more complex management of your git history. + +You can also manage your git history outside of aider with your preferred git tools. ## Disabling git integration @@ -36,6 +43,8 @@ While it is not recommended, you can disable aider's use of git in a few ways: ## Commit messages +Aider sends the `--weak-model` a copy of the diffs and the chat history +and asks it to produce a commit message. By default, aider creates commit messages which follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). @@ -45,6 +54,7 @@ with the `--commit-prompt` option. You can place that on the command line, or [configure it via a config file or environment variables](https://aider.chat/docs/config.html). + ## Commit attribution Aider marks commits that it either authored or committed. From e3a3a55dd58750ede1f3465d36a5d21a1d38bdf7 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 25 Oct 2024 10:57:03 -0700 Subject: [PATCH 2/3] fix: make file paths portable for Windows compatibility in tests --- tests/basic/test_commands.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/basic/test_commands.py b/tests/basic/test_commands.py index ee4fbf082..c430f86b4 100644 --- a/tests/basic/test_commands.py +++ b/tests/basic/test_commands.py @@ -1047,6 +1047,8 @@ class TestCommands(TestCase): ) ) + # ai: these filenames use / so tests fail on windows; fix the one above and below to be portable! + # Test dropping the read-only file using git_root referenced name commands.cmd_drop("subdir/test_read_only_file.txt") From bf60e58d5b0c0239b4c79173c3db59afc1ea36c6 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 25 Oct 2024 10:57:04 -0700 Subject: [PATCH 3/3] fix: use os.path.join for cross-platform path handling in tests --- tests/basic/test_commands.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/basic/test_commands.py b/tests/basic/test_commands.py index c430f86b4..40ae4fd5e 100644 --- a/tests/basic/test_commands.py +++ b/tests/basic/test_commands.py @@ -1037,7 +1037,7 @@ class TestCommands(TestCase): os.chdir(subdir) # Test the /read-only command using git_root referenced name - commands.cmd_read_only("subdir/test_read_only_file.txt") + commands.cmd_read_only(os.path.join("subdir", "test_read_only_file.txt")) # Check if the file was added to abs_read_only_fnames self.assertTrue( @@ -1047,10 +1047,8 @@ class TestCommands(TestCase): ) ) - # ai: these filenames use / so tests fail on windows; fix the one above and below to be portable! - # Test dropping the read-only file using git_root referenced name - commands.cmd_drop("subdir/test_read_only_file.txt") + commands.cmd_drop(os.path.join("subdir", "test_read_only_file.txt")) # Check if the file was removed from abs_read_only_fnames self.assertFalse(