Skip to content

Enable show more files in diff for git <2.31 #17733

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

Merged
merged 5 commits into from
Nov 20, 2021

Conversation

zeripath
Copy link
Contributor

Unfortunately due to a misread on my behalf I missed that git diff only learned
--skip-to in version 2.31.0. Thus this functionality was not working on older versions
of git.

This PR adds a handler that simply allows for us to skip reading the diffs until
we find the correct file to skip to.

Fix #17731

Signed-off-by: Andrew Thornton [email protected]

Unfortunately due to a misread on my behalf I missed that git diff only learned
--skip-to in version 2.31.0. Thus this functionality was not working on older versions
of git.

This PR adds a handler that simply allows for us to skip reading the diffs until
we find the correct file to skip to.

Fix go-gitea#17731

Signed-off-by: Andrew Thornton <[email protected]>
@zeripath zeripath added this to the 1.16.0 milestone Nov 19, 2021
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 19, 2021
@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 Nov 20, 2021
@lunny lunny added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Nov 20, 2021
@codecov-commenter
Copy link

codecov-commenter commented Nov 20, 2021

Codecov Report

❗ No coverage uploaded for pull request base (main@0d69e64). Click here to learn what that means.
The diff coverage is 39.21%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #17733   +/-   ##
=======================================
  Coverage        ?   45.52%           
=======================================
  Files           ?      807           
  Lines           ?    89824           
  Branches        ?        0           
=======================================
  Hits            ?    40894           
  Misses          ?    42392           
  Partials        ?     6538           
Impacted Files Coverage Δ
services/gitdiff/gitdiff.go 73.09% <38.00%> (ø)
modules/repofiles/temp_repo.go 56.86% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0d69e64...0045859. Read the comment docs.

Signed-off-by: Andrew Thornton <[email protected]>
@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 Nov 20, 2021
@jpraet
Copy link
Member

jpraet commented Nov 20, 2021

Validated with Git version 2.18.

@zeripath zeripath merged commit 931d0cf into go-gitea:main Nov 20, 2021
@zeripath zeripath deleted the refix-6380-500-on-load-more-diffs branch November 20, 2021 13:50
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
Unfortunately due to a misread on my behalf I missed that git diff only learned
--skip-to in version 2.31.0. Thus this functionality was not working on older versions
of git.

This PR adds a handler that simply allows for us to skip reading the diffs until
we find the correct file to skip to.

Fix go-gitea#17731

Signed-off-by: Andrew Thornton <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
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. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Internal server error when clicking "Show More" on large PR diff
8 participants