Page to show diff between 2 git refs #9018

Closed
opened 2025-11-02 08:26:09 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @XonqNopp on GitHub (Jun 1, 2022).

Feature Description

I think it would be helpful to have a web page to show the difference between 2 git refs. I think (but I clearly do not know your source code so maybe I am wrong) that it could be like "extracted" from the page of the PR diff, and would then accept 2 git refs (commit hash, branch name, tag...).

Then in the PR, it could be used with the branch names to work as it is today.

Where it gets interesting, is that when there is a new push/force-push in a PR, the comment saying "pushed from 123 to abc" could feature a link to the diff web page with the old and new commit. So users could easily see what changed compared to the previous status. If the review was already done and only minor fixes were applied, it helps save some time.

I tried to browse the issues mentioning diff but I am still not sure, maybe this is some kind of duplicate of #13416 or #12800 Sorry if so...

cc @99rgosse

Screenshots

No response

Originally created by @XonqNopp on GitHub (Jun 1, 2022). ### Feature Description I think it would be helpful to have a web page to show the difference between 2 git refs. I think (but I clearly do not know your source code so maybe I am wrong) that it could be like "extracted" from the page of the PR diff, and would then accept 2 git refs (commit hash, branch name, tag...). Then in the PR, it could be used with the branch names to work as it is today. Where it gets interesting, is that when there is a new push/force-push in a PR, the comment saying "pushed from 123 to abc" could feature a link to the diff web page with the old and new commit. So users could easily see what changed compared to the previous status. If the review was already done and only minor fixes were applied, it helps save some time. I tried to browse the issues mentioning diff but I am still not sure, maybe this is some kind of duplicate of #13416 or #12800 Sorry if so... cc @99rgosse ### Screenshots _No response_
GiteaMirror added the type/proposaltype/feature labels 2025-11-02 08:26:09 -06:00
Author
Owner

@fwdekker commented on GitHub (Dec 14, 2023):

You can compare two refs using the URL <owner>/<repo>/compare/<ref1>..<ref2>, for example 1d9ce8b661..8b135d6f3e. This also works with branches and tags instead of commits.

Also, with force pushes, there is a "compare" button to the right of the message:
Screenshot of the Gitea interface with the "compare" button on the right.

See for example https://try.gitea.io/florine/test/pulls/1.

@fwdekker commented on GitHub (Dec 14, 2023): You can compare two refs using the URL `<owner>/<repo>/compare/<ref1>..<ref2>`, for example https://try.gitea.io/florine/test/compare/1d9ce8b661edd20afa1697d793da8117e5c32dfa..8b135d6f3ed9cc359b2b307df49fe89e4d9f3515. This also works with branches and tags instead of commits. Also, with force pushes, there is a "compare" button to the right of the message: ![Screenshot of the Gitea interface with the "compare" button on the right.](https://github.com/go-gitea/gitea/assets/13442533/9ab831b0-cb81-4a74-bc2b-5eba4effecc1) See for example https://try.gitea.io/florine/test/pulls/1.
Author
Owner

@XonqNopp commented on GitHub (Dec 15, 2023):

Yes now it is working. Thanks

@XonqNopp commented on GitHub (Dec 15, 2023): Yes now it is working. Thanks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9018