Skip to content
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

[Bug] 500 on download pull-diff/patch file of a merged with deleted HeadBranch #10932

Closed
6543 opened this issue Apr 2, 2020 · 2 comments · Fixed by #10936
Closed

[Bug] 500 on download pull-diff/patch file of a merged with deleted HeadBranch #10932

6543 opened this issue Apr 2, 2020 · 2 comments · Fixed by #10936
Labels
Milestone

Comments

@6543
Copy link
Member

6543 commented Apr 2, 2020

test: https://gitea.com/gitnex/GitNex/pulls/340.diff

Gitea Version: 1.12.0+dev-82-g3723b0647

@6543 6543 changed the title [Bug] 500 when try to download a pull diff of a merged pull [Bug] 500 on download pull-diff of a merged with deleted HeadBranch Apr 2, 2020
@6543 6543 changed the title [Bug] 500 on download pull-diff of a merged with deleted HeadBranch [Bug] 500 on download pull-diff/patch file of a merged with deleted HeadBranch Apr 2, 2020
@6543
Copy link
Member Author

6543 commented Apr 2, 2020

solution: if pull is merged and Head branch deleted use merge-commit to get diff or patch

@6543
Copy link
Member Author

6543 commented Apr 3, 2020

related if merged and branch not deleted: pull-diff/patch is empty

conclusion: only use pull.MergedCommitID

zeripath added a commit to zeripath/gitea that referenced this issue Apr 3, 2020
Fix go-gitea#10932
Also fix "Empty Diff/Patch File when pull is merged"

Closes go-gitea#10934

Signed-off-by: Andrew Thornton <art27@cantab.net>
lunny pushed a commit that referenced this issue Apr 3, 2020
* Generate Diff and Patch direct from Pull head

Fix #10932
Also fix "Empty Diff/Patch File when pull is merged"

Closes #10934

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Add tests to ensure that diff does not change

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Ensure diffs and pulls pages work if head branch is deleted too

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit to zeripath/gitea that referenced this issue Apr 3, 2020
Backport go-gitea#10936

* Generate Diff and Patch direct from Pull head

Fix go-gitea#10932
Also fix "Empty Diff/Patch File when pull is merged"

Closes go-gitea#10934

* Add tests to ensure that diff does not change
* Ensure diffs and pulls pages work if head branch is deleted too

Signed-off-by: Andrew Thornton <art27@cantab.net>
lafriks pushed a commit that referenced this issue Apr 3, 2020
Backport #10936

* Generate Diff and Patch direct from Pull head

Fix #10932
Also fix "Empty Diff/Patch File when pull is merged"

Closes #10934

* Add tests to ensure that diff does not change
* Ensure diffs and pulls pages work if head branch is deleted too

Signed-off-by: Andrew Thornton <art27@cantab.net>
@lafriks lafriks added this to the 1.11.5 milestone Apr 3, 2020
@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.
Labels
Projects
None yet
2 participants