Skip to content

Error while rebasing PR with conflicts #4078

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 of 7 tasks
apricote opened this issue May 29, 2018 · 7 comments
Closed
2 of 7 tasks

Error while rebasing PR with conflicts #4078

apricote opened this issue May 29, 2018 · 7 comments

Comments

@apricote
Copy link
Contributor

[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.

Screenshots

rebase_1
rebase_2

@sbstp
Copy link

sbstp commented Jun 5, 2018

GitHub's docs discuss the issue. They just detect the conflicts and ask the user to rebase manually on the base branch and force push.
The animated GIF on this blog post seems to display a case like the one described here, the merge with commit button is green but the rebase and merge is grayed out.

@techknowlogick techknowlogick modified the milestones: 1.6.0, 1.7.0 Aug 29, 2018
@lafriks lafriks modified the milestones: 1.7.0, 1.8.0 Dec 27, 2018
@techknowlogick techknowlogick modified the milestones: 1.8.0, 1.9.0 Feb 19, 2019
@yegordovganich
Copy link

Can it be fixed sooner than 1.9.0 Milestone, please. It's quite inconvenient...

@apricote
Copy link
Contributor Author

apricote commented Mar 4, 2019

AFAIK no one is working on this issue. The assigned milestone does not reflect the actual planned release for the fix/bug.

@yegordovganich
Copy link

OK, so what is the actual planned release?:)

@lunny
Copy link
Member

lunny commented Mar 17, 2019

I think we should fix that on v1.9 or before.

@stale
Copy link

stale bot commented May 16, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label May 16, 2019
@stale
Copy link

stale bot commented May 30, 2019

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale stale bot closed this as completed May 30, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants