mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-05 21:27:01 +00:00
enhance!: raise minimum git version to 2.34 (#39565)
Raise the minimum git version to 2.34, the version in Ubuntu 22.04, Debian 12 and RHEL 8 ship newer, and remove the fallbacks it makes obsolete. - Always enable AGit - Use `diff --skip-to` and `apply -3` unconditionally - Set the default branch of new repos and wikis via `git init --initial-branch` - Detect rebase conflicts via `REBASE_HEAD`
This commit is contained in:
@@ -63,7 +63,7 @@ func TestAPIViewPulls(t *testing.T) {
|
||||
resp = ctx.Session.MakeRequest(t, NewRequest(t, "GET", pull.DiffURL), http.StatusOK)
|
||||
bs, err := io.ReadAll(resp.Body)
|
||||
assert.NoError(t, err)
|
||||
patch, err := gitdiff.ParsePatch(t.Context(), 1000, 5000, 10, bytes.NewReader(bs), "")
|
||||
patch, err := gitdiff.ParsePatch(t.Context(), 1000, 5000, 10, bytes.NewReader(bs))
|
||||
assert.NoError(t, err)
|
||||
if assert.Len(t, patch.Files, 1) {
|
||||
assert.Equal(t, "File-WoW", patch.Files[0].Name)
|
||||
@@ -100,7 +100,7 @@ func TestAPIViewPulls(t *testing.T) {
|
||||
resp = ctx.Session.MakeRequest(t, NewRequest(t, "GET", pull.DiffURL), http.StatusOK)
|
||||
bs, err := io.ReadAll(resp.Body)
|
||||
assert.NoError(t, err)
|
||||
patch, err := gitdiff.ParsePatch(t.Context(), 1000, 5000, 10, bytes.NewReader(bs), "")
|
||||
patch, err := gitdiff.ParsePatch(t.Context(), 1000, 5000, 10, bytes.NewReader(bs))
|
||||
assert.NoError(t, err)
|
||||
if assert.Len(t, patch.Files, 1) {
|
||||
assert.Equal(t, "README.md", patch.Files[0].Name)
|
||||
@@ -133,7 +133,7 @@ func TestAPIViewPulls(t *testing.T) {
|
||||
resp = ctx.Session.MakeRequest(t, NewRequest(t, "GET", pull.DiffURL), http.StatusOK)
|
||||
bs, err := io.ReadAll(resp.Body)
|
||||
assert.NoError(t, err)
|
||||
patch, err := gitdiff.ParsePatch(t.Context(), 1000, 5000, 10, bytes.NewReader(bs), "")
|
||||
patch, err := gitdiff.ParsePatch(t.Context(), 1000, 5000, 10, bytes.NewReader(bs))
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, patch.Files, 1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user