Init gist with regular urls via git CLI (http) (#501)

هذا الالتزام موجود في:
Thomas Miceli
2025-08-28 02:44:09 +02:00
ملتزم من قبل GitHub
الأصل 2976173658
التزام 905276f24b
14 ملفات معدلة مع 522 إضافات و307 حذوفات

عرض الملف

@@ -8,6 +8,7 @@ import (
"net/http/httptest"
"net/url"
"os"
"os/exec"
"path/filepath"
"reflect"
"runtime"
@@ -153,8 +154,16 @@ func Setup(t *testing.T) *TestServer {
config.C.Index = ""
config.C.LogLevel = "error"
config.C.GitDefaultBranch = "master"
config.InitLog()
err = exec.Command("git", "config", "--global", "--type", "bool", "push.autoSetupRemote", "true").Run()
require.NoError(t, err)
err = exec.Command("git", "config", "--global", "user.email", "test@opengist.io").Run()
require.NoError(t, err)
err = exec.Command("git", "config", "--global", "user.name", "test").Run()
require.NoError(t, err)
homePath := config.GetHomeDir()
log.Info().Msg("Data directory: " + homePath)