paul-gauthier / aider

aider is AI pair programming in your terminal
https://aider.chat/
Apache License 2.0
12.56k stars 1.2k forks source link

Do not modify author field in git #698

Closed wbazant closed 3 days ago

wbazant commented 1 week ago

Issue

I'd like to remain listed as author of the commits I make the way I specified it in my git config. How can I configure the tool to stop putting stuff like Author: Wojtek Bazant (aider) <wojciech.bazant+ebi@gmail.com> into commit log, that I then have correct with git commit --amend --author="Wojtek Bazant <wojciech.bazant+ebi@gmail.com>" ?

Version and model info

No response

paul-gauthier commented 1 week ago

Thanks for trying aider and filing this issue. This is a fair point. I can add a config to disable attribution of aider code using the author name.

paul-gauthier commented 1 week ago

I added config options to disable attribution in the author and/or committer name field.

https://aider.chat/docs/options.html#--attribute-author

The change is available in the main branch. You can get it by installing the latest version from github:

python -m pip install --upgrade git+https://github.com/paul-gauthier/aider.git

If you have a chance to try it, let me know if it works better for you.

wbazant commented 4 days ago

Thank you for the reply and your work on this project! The solution fits my use case of wanting to have the commits look a certain way, and I checked it works.

When I tried to undo a commit with the flags on, aider didn't recognise it, which is perhaps a bug:

Applied edit to src/components/ui/AddLocationPin.js
Commit 4689d76 Added a new AddLocationPin component that renders a pin image at the center of its container, typically used to indicate the location where a new point will be added on
a map.
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
src/components/ui/AddLocationPin.js                                                                                                                                                    
> /undo                                                                                                                                                                                

The last commit was not made by aider in this chat session.
You could try `/git reset --hard HEAD^` but be aware that this is a destructive command!
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
src/components/ui/AddLocationPin.js                                                                                                                                                    
>  
ethomas2 commented 4 days ago

@wbazant would this suggestion be preferable? https://github.com/paul-gauthier/aider/issues/737

paul-gauthier commented 3 days ago

@wbazant thanks for reporting that bug. It's fixed now in the latest version v0.40.6.