mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-21 09:06:46 +09: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:
1 parent
4bebd86285
commit
eb4468ff4e
38 files changed
+177
-404
No files matched your search
@@ -24,7 +24,8 @@ func TestCreateRepositoryDirectly(t *testing.T) {
|
||||
testRepoName := "created-repo"
|
||||
t.Run("Success", func(t *testing.T) {
|
||||
createdRepo, err := CreateRepositoryDirectly(t.Context(), user2, user2, CreateRepoOptions{
|
||||
Name: testRepoName,
|
||||
Name: testRepoName,
|
||||
DefaultBranch: "custom-default",
|
||||
}, true)
|
||||
assert.NoError(t, err)
|
||||
assert.NotNil(t, createdRepo)
|
||||
@@ -33,6 +34,10 @@ func TestCreateRepositoryDirectly(t *testing.T) {
|
||||
assert.NoError(t, err)
|
||||
assert.True(t, exist)
|
||||
|
||||
branch, err := git.GetDefaultBranch(t.Context(), createdRepo)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "custom-default", branch)
|
||||
|
||||
unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: user2.Name, Name: createdRepo.Name})
|
||||
|
||||
err = DeleteRepositoryDirectly(t.Context(), createdRepo.ID)
|
||||
|
||||
Reference in new issue
Block a user