mirror of
https://github.com/go-gitea/gitea.git
synced 2025-09-22 01:58:17 +00:00
Move git command to git/gitcmd (#35483)
The name cmd is already used in many places and may cause conflicts, so I chose `gitcmd` instead to minimize potential naming conflicts.
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"code.gitea.io/gitea/modules/git"
|
||||
"code.gitea.io/gitea/modules/git/gitcmd"
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
)
|
||||
|
||||
@@ -72,8 +72,8 @@ func readUnmergedLsFileLines(ctx context.Context, tmpBasePath string, outputChan
|
||||
}()
|
||||
|
||||
stderr := &strings.Builder{}
|
||||
err = git.NewCommand("ls-files", "-u", "-z").
|
||||
Run(ctx, &git.RunOpts{
|
||||
err = gitcmd.NewCommand("ls-files", "-u", "-z").
|
||||
Run(ctx, &gitcmd.RunOpts{
|
||||
Dir: tmpBasePath,
|
||||
Stdout: lsFilesWriter,
|
||||
Stderr: stderr,
|
||||
@@ -116,7 +116,7 @@ func readUnmergedLsFileLines(ctx context.Context, tmpBasePath string, outputChan
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
outputChan <- &lsFileLine{err: fmt.Errorf("git ls-files -u -z: %w", git.ConcatenateError(err, stderr.String()))}
|
||||
outputChan <- &lsFileLine{err: fmt.Errorf("git ls-files -u -z: %w", gitcmd.ConcatenateError(err, stderr.String()))}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user