Squash in PR with co-authored
Description
- Create Pull Request with 1 commit from another author
- Click Create Squash commit by another gitea account
- Delete all template message and leave only new line
- Click Create Squash commit
commit message contains deleted lines
See video - https://github.com/user-attachments/assets/60cc083b-c629-4c6a-b818-5fc99fca6dc4
Example of PR - https://demo.gitea.com/trofim24/test-bug/pulls/1
Gitea Version
1.22.1
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
1.23.0+dev-460-ga366af4b7a
Operating System
macos
How are you running Gitea?
using https://demo.gitea.com/
Database
None
I tried many times, but I only reproduced it once. I think it might be caused by cache. Can you reproduce the issue again?
@hiifong I reproduced this problem now on latest gitea version in incognito mode. It's not cache Commit and PR must be from one user Squash must do another user with delete all template message and leave only new line View new video
Version: 1.23.0+dev-789-g18061af490
https://github.com/user-attachments/assets/f48a44be-6ce3-4f53-bbdc-52c7f4938033
@hiifong I reproduced this problem now on latest gitea version in incognito mode. It's not cache Commit and PR must be from one user Squash must do another user with delete all template message and leave only new line View new video
Version: 1.23.0+dev-789-g18061af490
Screen.Recording.2024-12-16.at.10.48.50.AM.mov
Thank you for your report
Based on my review of the documentation, it appears that ADD_CO_COMMITTER_TRAILERS is enabled by default, which doesn't seem to be a bug. If you prefer not to have co-author and co-committer information in the commit message, you may consider disabling the ADD_CO_COMMITTER_TRAILERS option. If you have any further questions, please feel free to continue the discussion.
@hiifong I think, this different behavior depending on who creates Pull Request seems like a bug.
- Commit creates User1. PR and Squash with delete all template message and leave only new line creates User2. Commit message doesn't contain deleted lines.
- Commit and PR creates User1. Squash with delete all template message and leave only new line creates User2. Commit message contains deleted lines.
@hiifong I think, this different behavior depending on who creates Pull Request seems like a bug.
- Commit creates User1. PR and Squash with delete all template message and leave only new line creates User2. Commit message doesn't contain deleted lines.
- Commit and PR creates User1. Squash with delete all template message and leave only new line creates User2. Commit message contains deleted lines.
Maybe #33020 can fix this bug