mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-23 22:53:17 +00:00
Enable show more files in diff for git <2.31 (#17733)
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 <art27@cantab.net>
This commit is contained in:
1 parent
0d69e64e03
commit
931d0cf854
4 files changed
+253
-32
No files matched your search
@@ -188,7 +188,7 @@ c,d,e`,
|
||||
}
|
||||
|
||||
for n, c := range cases {
|
||||
diff, err := ParsePatch(setting.Git.MaxGitDiffLines, setting.Git.MaxGitDiffLineCharacters, setting.Git.MaxGitDiffFiles, strings.NewReader(c.diff))
|
||||
diff, err := ParsePatch(setting.Git.MaxGitDiffLines, setting.Git.MaxGitDiffLineCharacters, setting.Git.MaxGitDiffFiles, strings.NewReader(c.diff), "")
|
||||
if err != nil {
|
||||
t.Errorf("ParsePatch failed: %s", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user