Commit Comments lost when 'amending' last commit?

Started by johmut, February 21, 2025, 07:39:32 AM

Previous topic - Next topic

johmut

Hi,
When committing changes (locally), you can select to Amend the last commit instead of creating a new one.
The changes are indeed amended, however the comments on prior commits are replaced by the comment on the last commit. I would have expected the comments to be amended as well. Is this by Design? Is there a way to copy/paste the comments of the previous commit(s) in the textbox for the new commit comment?
TIA, JohMut

Phil Beauvoir

Agree it would be useful to add the last commit's message when the "Amend last commit" checkbox is selected. I'll do something for the next version.

> Is there a way to copy/paste the comments of the previous commit(s) in the textbox for the new commit comment?

For now you can, before committing, select the commit in the "Change History" window and copy the message there.
If you value and use Archi, please consider making a donation.
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

johmut


Phil Beauvoir

#3
Actually, you can get it now in coArchi 0.9.3:

https://www.archimatetool.com/plugins/#coArchi

When you check the "Amend last commit instead of creating new one" checkbox in the Commit dialog, the commit message will be replaced by the previous message if the textbox is empty. If the textbox is not empty (because you added some text), you will be asked if you want to replace it. (This is the same behaviour that the SmartGit app uses).
If you value and use Archi, please consider making a donation.
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.