Skip to content

gitea serv doesn't respect git's binary path in config(app.ini): #23137

Closed
@wxiaoguang

Description

@wxiaoguang

Description

gitea serv doesn't respect git's binary path in config(app.ini):

gitea/cmd/serv.go

Lines 293 to 304 in 10cdcb9

// Special handle for Windows.
if setting.IsWindows {
verb = strings.Replace(verb, "-", " ", 1)
}
var gitcmd *exec.Cmd
verbs := strings.Split(verb, " ")
if len(verbs) == 2 {
gitcmd = exec.CommandContext(ctx, verbs[0], verbs[1], repoPath)
} else {
gitcmd = exec.CommandContext(ctx, verb, repoPath)
}

If a user has different git versions, this code might execute an incorrect git.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions