mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 08:38:22 +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:
		@@ -11,7 +11,7 @@ import (
 | 
			
		||||
	"strings"
 | 
			
		||||
	"sync"
 | 
			
		||||
 | 
			
		||||
	"code.gitea.io/gitea/modules/git"
 | 
			
		||||
	"code.gitea.io/gitea/modules/git/gitcmd"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// NameRevStdin runs name-rev --stdin
 | 
			
		||||
@@ -22,7 +22,7 @@ func NameRevStdin(ctx context.Context, shasToNameReader *io.PipeReader, nameRevS
 | 
			
		||||
 | 
			
		||||
	stderr := new(bytes.Buffer)
 | 
			
		||||
	var errbuf strings.Builder
 | 
			
		||||
	if err := git.NewCommand("name-rev", "--stdin", "--name-only", "--always").Run(ctx, &git.RunOpts{
 | 
			
		||||
	if err := gitcmd.NewCommand("name-rev", "--stdin", "--name-only", "--always").Run(ctx, &gitcmd.RunOpts{
 | 
			
		||||
		Dir:    tmpBasePath,
 | 
			
		||||
		Stdout: nameRevStdinWriter,
 | 
			
		||||
		Stdin:  shasToNameReader,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user