mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-30 05:44:27 +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:
		| @@ -14,6 +14,7 @@ import ( | ||||
| 	"sync" | ||||
|  | ||||
| 	"code.gitea.io/gitea/modules/git" | ||||
| 	"code.gitea.io/gitea/modules/git/gitcmd" | ||||
| ) | ||||
|  | ||||
| // FindLFSFile finds commits that contain a provided pointer file hash | ||||
| @@ -32,13 +33,13 @@ func FindLFSFile(repo *git.Repository, objectID git.ObjectID) ([]*LFSResult, err | ||||
|  | ||||
| 	go func() { | ||||
| 		stderr := strings.Builder{} | ||||
| 		err := git.NewCommand("rev-list", "--all").Run(repo.Ctx, &git.RunOpts{ | ||||
| 		err := gitcmd.NewCommand("rev-list", "--all").Run(repo.Ctx, &gitcmd.RunOpts{ | ||||
| 			Dir:    repo.Path, | ||||
| 			Stdout: revListWriter, | ||||
| 			Stderr: &stderr, | ||||
| 		}) | ||||
| 		if err != nil { | ||||
| 			_ = revListWriter.CloseWithError(git.ConcatenateError(err, (&stderr).String())) | ||||
| 			_ = revListWriter.CloseWithError(gitcmd.ConcatenateError(err, (&stderr).String())) | ||||
| 		} else { | ||||
| 			_ = revListWriter.Close() | ||||
| 		} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user