Description
- Gitea version (or commit ref): master, 832ca50
- Git version: Locally tested with
2.17.0
- Operating system: Arch Linux Kernel
4.16.11
- Database (use
[x]
): Locally tested with SQLite- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes: https://try.gitea.io/apricote/rebase-conflict/pulls/1
- No
- Not relevant
- Log gist:
[Macaron] 2018-05-29 22:29:47: Started POST /apricote/rebase-conflict/pulls/1/merge for [::1]
[git-module] /home/julian/.gitea/repositories/apricote/rebase-conflict.git: git -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= tag -l --sort=-v:refname
[git-module] /home/julian/.gitea/repositories/apricote/rebase-conflict.git: git -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= for-each-ref --format=%(refname) refs/heads/
[git-module] stdout:
refs/heads/feature
refs/heads/master
[git-module] /home/julian/.gitea/repositories/apricote/rebase-conflict.git: git -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= show-ref --verify refs/heads/master
[git-module] stdout:
4db6af38e879d59d87863ddeadc00d516cf9d4e3 refs/heads/master
[Macaron] 2018-05-29 22:29:47: Completed POST /apricote/rebase-conflict/pulls/1/merge 404 Not Found in 695.886888ms
Description
I am trying to merge a pull request with the "Rebase and Merge" style. The pull request UI shows me that "[t]his pull request can be merged automatically". When I now click the button, an error page 500 is shown with the message "An error has occurred : git rebase [/home/julian/.gitea/repositories/apricote/rebase-conflict.git -> /home/julian/go/src/code.gitea.io/gitea/data/tmp/local-repo/merge-249575514.git]: error: Failed to merge in the changes.
" and the PR did not get merged.
I think this bug is happening because the PullRequestStatusMergeable
is set when the sum of all commits is auto-mergeable, this makes sense and works for the normal merge and also squashing. But because rebasing will merge in every commit on its own, any conflict that arises will immediately stop the (automatic) rebase.
You can check out the example repository at try.gitea.io/apricote/rebase-conflict, if you fork it to your own account and try to rebase the feature
onto the master
branch the error should surface.
This error also happens if using the proposed "rebase and merge (--no-ff)" feature in #4052.