Skip to content

Conversation

brechtvl
Copy link
Contributor

To quickly see what changed without having to re-read the whole diff.

@brechtvl
Copy link
Contributor Author

force_push_compare

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 11, 2023
@lunny lunny added the type/enhancement An improvement of existing functionality label Feb 11, 2023
@techknowlogick techknowlogick added this to the 1.20.0 milestone Feb 24, 2023
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 24, 2023
@@ -707,6 +707,11 @@
{{$.locale.TrN (len .Commits) "repo.issues.push_commit_1" "repo.issues.push_commits_n" (len .Commits) $createdStr | Safe}}
{{end}}
</span>
{{if and .IsForcePush $.Issue.PullRequest.BaseRepo.Name}}
<span class="ui float right comparebox">
<a href="{{$.Issue.PullRequest.BaseRepo.Link}}/compare/{{PathEscape .OldCommit}}..{{PathEscape .NewCommit}}" rel="nofollow" class="ui compare label">{{$.locale.Tr "repo.issues.force_push_compare"}}</a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I already wondered how you would solve the problem that a force-pushed commit might have been deleted by Git GC. Your approach works of course, as it will simply display a 404 or similar…


I'm wondering: Should we perhaps open the comparison in a new tab?
You probably want to continue using this tab, if you're already taking the time to go through the individual commit history…

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 1, 2023
To quickly see what changed without having to re-read the whole diff.
@techknowlogick techknowlogick force-pushed the pr-force-push-compare branch from 03e90d3 to dab464f Compare March 1, 2023 19:17
@techknowlogick techknowlogick merged commit 545495d into go-gitea:main Mar 1, 2023
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 2, 2023
* giteaofficial/main:
  Fix commit retrieval by tag (go-gitea#21804)
  Fix missed `.hide` class (go-gitea#23208)
  [skip ci] Updated translations via Crowdin
  Add loading yaml label template files (go-gitea#22976)
  Allow `<video>` in MarkDown (go-gitea#22892)
  Pull Requests: add button to compare force pushed commits (go-gitea#22857)
  Do not create commit graph for temporary repos (go-gitea#23219)
  Use the correct selector to hide the checkmark of selected labels on clear (go-gitea#23224)
  Order pull request conflict checking by recently updated, for each push (go-gitea#23220)
  Fix incorrect checkbox behaviors in the dashboard repolist's filter (go-gitea#23147)
@brechtvl brechtvl deleted the pr-force-push-compare branch March 11, 2023 11:29
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants