Skip to content

Commit f87d5ea

Browse files
Gustedjolheiser
Gusted
andauthored
Remove go 1.15 support (#18511)
- Remove support for go 1.15(go.mod already requires go 1.16). Co-authored-by: John Olheiser <[email protected]>
1 parent 1de5028 commit f87d5ea

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

modules/git/command.go

-4
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,6 @@ func (c *Command) RunWithContext(rc *RunContext) error {
165165
"GIT_TERMINAL_PROMPT=0",
166166
)
167167

168-
// TODO: verify if this is still needed in golang 1.15
169-
if goVersionLessThan115 {
170-
cmd.Env = append(cmd.Env, "GODEBUG=asyncpreemptoff=1")
171-
}
172168
cmd.Dir = rc.Dir
173169
cmd.Stdout = rc.Stdout
174170
cmd.Stderr = rc.Stderr

modules/git/git.go

-11
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ var (
3535

3636
gitVersion *version.Version
3737

38-
// will be checked on Init
39-
goVersionLessThan115 = true
40-
4138
// SupportProcReceive version >= 2.29.0
4239
SupportProcReceive bool
4340
)
@@ -156,14 +153,6 @@ func Init(ctx context.Context) error {
156153
return err
157154
}
158155

159-
// Save if the go version used to compile gitea is greater or equal 1.15
160-
runtimeVersion, err := version.NewVersion(strings.TrimPrefix(runtime.Version(), "go"))
161-
if err != nil {
162-
return err
163-
}
164-
version115, _ := version.NewVersion("1.15")
165-
goVersionLessThan115 = runtimeVersion.LessThan(version115)
166-
167156
// Git requires setting user.name and user.email in order to commit changes - if they're not set just add some defaults
168157
for configKey, defaultValue := range map[string]string{"user.name": "Gitea", "user.email": "[email protected]"} {
169158
if err := checkAndSetConfig(configKey, defaultValue, false); err != nil {

0 commit comments

Comments
 (0)