Fix compile error

release/0.12
Joe Chen 2023-02-25 13:05:41 +08:00
parent b1576d5a1f
commit 01917975f9
No known key found for this signature in database
GPG Key ID: 0BDE5280C552FF60
2 changed files with 6 additions and 4 deletions

View File

@ -1970,7 +1970,9 @@ func GitFsck() {
repo := bean.(*Repository)
repoPath := repo.RepoPath()
err := git.RepoFsck(repoPath, git.FsckOptions{
Args: conf.Cron.RepoHealthCheck.Args,
CommandOptions: git.CommandOptions{
Args: conf.Cron.RepoHealthCheck.Args,
},
Timeout: conf.Cron.RepoHealthCheck.Timeout,
})
if err != nil {

View File

@ -197,7 +197,7 @@ func (repo *Repository) UpdateRepoFile(doer *User, opts UpdateRepoFileOptions) (
RepoName: repo.Name,
RepoPath: repo.RepoPath(),
})
if err = git.RepoPush(localPath, "origin", opts.NewBranch, git.PushOptions{Envs: envs}); err != nil {
if err = git.RepoPush(localPath, "origin", opts.NewBranch, git.PushOptions{CommandOptions: git.CommandOptions{Envs: envs}}); err != nil {
return fmt.Errorf("git push origin %s: %v", opts.NewBranch, err)
}
return nil
@ -302,7 +302,7 @@ func (repo *Repository) DeleteRepoFile(doer *User, opts DeleteRepoFileOptions) (
RepoName: repo.Name,
RepoPath: repo.RepoPath(),
})
if err = git.RepoPush(localPath, "origin", opts.NewBranch, git.PushOptions{Envs: envs}); err != nil {
if err = git.RepoPush(localPath, "origin", opts.NewBranch, git.PushOptions{CommandOptions: git.CommandOptions{Envs: envs}}); err != nil {
return fmt.Errorf("git push origin %s: %v", opts.NewBranch, err)
}
return nil
@ -536,7 +536,7 @@ func (repo *Repository) UploadRepoFiles(doer *User, opts UploadRepoFileOptions)
RepoName: repo.Name,
RepoPath: repo.RepoPath(),
})
if err = git.RepoPush(localPath, "origin", opts.NewBranch, git.PushOptions{Envs: envs}); err != nil {
if err = git.RepoPush(localPath, "origin", opts.NewBranch, git.PushOptions{CommandOptions: git.CommandOptions{Envs: envs}}); err != nil {
return fmt.Errorf("git push origin %s: %v", opts.NewBranch, err)
}