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

Feature: Allow comparison of tags, etc. #3780

Closed
1 task done
ypnos opened this issue Apr 10, 2018 · 5 comments · Fixed by #15723
Closed
1 task done

Feature: Allow comparison of tags, etc. #3780

ypnos opened this issue Apr 10, 2018 · 5 comments · Fixed by #15723
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/feature Completely new functionality. Can only be merged if feature freeze is not active.

Comments

@ypnos
Copy link

ypnos commented Apr 10, 2018

Description

Right now the comparison functionality is unnecessarily constraint. It only allows to compare branches, but not tags or single commits. Comparing to tags would be a very useful feature; e.g. to view changes since last release, or compare different releases.

  1. Allow to provide tag names for comparison, e.g. https://try.gitea.io/hans/testa/compare/master...funny or https://try.gitea.io/hans/testa/compare/master...tag:funny

  2. Provide green comparison button for tags as well as branches, e.g. the button is currently present here:
    https://try.gitea.io/hans/testa/src/branch/master
    but not here:
    https://try.gitea.io/hans/testa/src/tag/funny

  3. While we are at it, also provide the functionality for commit hashes, e.g.
    https://try.gitea.io/hans/testa/compare/bd0928b003...master

This is also related to #1352

@lafriks lafriks added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Apr 10, 2018
@stale
Copy link

stale bot commented Jan 28, 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 Jan 28, 2019
@lunny lunny added issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented and removed issue/stale labels Feb 6, 2019
@elesiuta
Copy link
Contributor

I am interested in this feature as well, and it looks like 3 has already been implemented at some point.

As for always showing the compare button, it should be fine to just remove .CanCompareOrPull from here?

{{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}}
The compare page already seems to be able to properly detect if a pull request is possible when branches are selected anyways.
compare commits: https://try.gitea.io/davidak/youtube-dl/compare/d65d89183f...48c5663c5f
compare branches: https://try.gitea.io/davidak/youtube-dl/compare/master...download-server
compare commits across different branches: https://try.gitea.io/davidak/youtube-dl/compare/416da574ec...36ef9d9509

However, I'm not sure how to add the ability to enter (and possibly search and select) commits from the branch drop down on the compare page, or if there's a better way to implement the user interface for this? An alternative to just make editing the url easier could be adding copy buttons next to commits like github has https://github.com/go-gitea/gitea/commits/master since the text can't be selected from the hash.

@nodiscc
Copy link
Contributor

nodiscc commented Mar 1, 2021

As I just discovered, commit/branch/tag comparison already works, it can be accessed from the /branches page under each repo then clicking on New pull request (the compare page is shown with a button to start a new pull request). Commits/branches/tags can all be compared by changing the URL tip...base.

ability to enter (and possibly search and select) commits from the branch drop down on the compare page, or if there's a better way to implement the user interface for this?

Also not sure about commits (showing all commit hashes under the dropdown menu would be rather bad), but I think tags should appear in the dropdown.

@zeripath
Copy link
Contributor

zeripath commented Mar 1, 2021

We need to add a .. compare endpoint that does git diff a..b instead of a...b.

It should not be too difficult to add but for the fact the compare endpoint is rather convoluted.

@jtran
Copy link
Contributor

jtran commented May 4, 2021

Anyone following this thread, you may be interested in PR #15695, which was recently merged, and a new PR #15723. This latest PR doesn't exactly implement number 2 above, but it's an alternate UI for selecting tags to compare. Please help test and review it.

There's another issue for two-dot compare #12349, and that would be nice. But I don't think that should block movement here, especially based on what GitHub's UI does.

@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants