-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
The /compare/x...y page now displays diff from the merge-base to y instead of from x to y #12349
Comments
This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions. |
I believe this is still relevant. |
@CyberShadow witch gitea version do you use? |
We are on 1.8.3 for the time being due to this issue. |
@CyberShadow your version is not supported anymore :/ there is a good chance this bug is fixed in master ... didn't test current stable release nor master jet (give me some time) In any case It's a good choice to upgrade to 1.12.4 |
@CyberShadow if you have questions about upgrade feel free to ask, I'll close this issue since this wont be fixed ... |
I'm gonna reopen it as I think we could support this. |
@6543 No, that's the wrong result. It needs to go from b (the ref in the URL) to c, not from a (the common ancestor) to c. Kindly reopen. |
sorry then 🙃 and thanks for checking&reporting |
Worth mentioning is that GitHub follows Git's syntax convention in its URLs: https://www.github.com/CyberShadow/gitea12349/compare/master..c <- two dots - direct compare from master to c Gitea could follow the same convention by adding the two-dot URL variant (or rather, restoring the pre-1.9 behavior with that URL syntax). |
It should have been done in the latest release. |
Indeed, seems to work. https://gitea.com/CyberShadow/test12349/compare/master..c Thank you! |
To reproduce:
Visiting the compare URL with the SHA-1s of the two diverging branches shows the diff from their common ancestor to c, instead of from master to c.
This is a regression: this feature worked in 1.8.3 and stopped working in 1.9.6. It was extremely useful for viewing the diff from before and after a force-push.
I noticed that the URL syntax has three periods, and the new behavior thus matches git-diff's behavior when also using x...y (three periods - "symmetric difference"). Perhaps Gitea should support /compare/x..y (two periods) to do the same as the old behavior (direct diff from x to y)?
The text was updated successfully, but these errors were encountered: