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

Versions in Pull requests. #12604

Closed
ghost opened this issue Aug 25, 2020 · 7 comments
Closed

Versions in Pull requests. #12604

ghost opened this issue Aug 25, 2020 · 7 comments
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/question Issue needs no code to be fixed, only a description on how to fix it yourself.

Comments

@ghost
Copy link

ghost commented Aug 25, 2020

After someone opened a PR from a branch every push that introduces new commits (including the cases where some or all of the previous commits are removed/changed) should generate an entry, a kind of "new version" in the Pull Request's page.

It should be possible to quickly look at this entry generated and find out what has changed between the versions (by taking the user to a diff/compar page)

This is supported in Github, Gitlab, and Gerrit.

Also on the changes Files changed tab the user should be able to compare any two versions and see what has changed between those versions.
(This is supported in Gitlab and Gerrit but not in Github at the moment, or at least its not clearly reachable from the PR's page).

@jolheiser
Copy link
Member

For the first part, do you mean the commits tab?
Or the conversation tab, which shows a timeline of commits?

The second part is achievable by manually building the URL, however similar to GH there isn't an easy way to do it from the UI.

@jolheiser jolheiser added the type/question Issue needs no code to be fixed, only a description on how to fix it yourself. label Aug 25, 2020
@ghost
Copy link
Author

ghost commented Aug 26, 2020

@jolheiser Does the commit tab show the changes between the old version of a branch and a new version of a branch if I do a git push --force? I don't think so.

@ghost
Copy link
Author

ghost commented Aug 26, 2020

The second part is achievable by manually building the URL, however similar to GH there isn't an easy way to do it from the UI.

Yes that is the point of this issue, to add a something like what's in gerrit (or I think a similar feature exists in reviewboard too)

See here:
https://gerrit-review.googlesource.com/Documentation/user-review-ui.html#patch-sets

https://gerrit-review.googlesource.com/Documentation/user-review-ui.html#diff-against

@ghost
Copy link
Author

ghost commented Aug 26, 2020

To be able to store replaced commits which are no longer on the branch (because they have been replaced by rewritten commits by a force push) an extra ref would need to be created by gitea. This is how it is done by gerrit:

https://gerrit-review.googlesource.com/Documentation/concept-refs-for-namespace.html

In fact, for each commit pushed to this ref, Gerrit creates a new ref under a refs/changes/ namespace, which Gerrit uses to track these commits. These references use the following format:

refs/changes/[CD]/[ABCD]/[EF]

Where:

[CD] is the last two digits of the change number

[ABCD] is the change number

[EF] is the patch set number

For example:

refs/changes/20/884120/1

@ghost
Copy link
Author

ghost commented Aug 26, 2020

Also you can see an explanation of how this works in gerrit here: https://www.beepsend.com/2016/04/05/abandoning-gitflow-github-favour-gerrit/
in the Updating a code review, What is a patch set and Working with patch sets sections.

@stale
Copy link

stale bot commented Oct 25, 2020

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.

@stale stale bot added the issue/stale label Oct 25, 2020
@lunny lunny added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Oct 25, 2020
@ghost ghost mentioned this issue Oct 26, 2020
@a1012112796
Copy link
Member

Ping stale bot

@stale stale bot removed the issue/stale label Jan 4, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2023
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/question Issue needs no code to be fixed, only a description on how to fix it yourself.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants