Răsfoiți Sursa

Fix compile error

Joe Chen 2 ani în urmă
părinte
comite
01917975f9
2 a modificat fișierele cu 6 adăugiri și 4 ștergeri
  1. 3 1
      internal/db/repo.go
  2. 3 3
      internal/db/repo_editor.go

+ 3 - 1
internal/db/repo.go

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

+ 3 - 3
internal/db/repo_editor.go

@@ -197,7 +197,7 @@ func (repo *Repository) UpdateRepoFile(doer *User, opts UpdateRepoFileOptions) (
 		RepoName:  repo.Name,
 		RepoName:  repo.Name,
 		RepoPath:  repo.RepoPath(),
 		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 fmt.Errorf("git push origin %s: %v", opts.NewBranch, err)
 	}
 	}
 	return nil
 	return nil
@@ -302,7 +302,7 @@ func (repo *Repository) DeleteRepoFile(doer *User, opts DeleteRepoFileOptions) (
 		RepoName:  repo.Name,
 		RepoName:  repo.Name,
 		RepoPath:  repo.RepoPath(),
 		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 fmt.Errorf("git push origin %s: %v", opts.NewBranch, err)
 	}
 	}
 	return nil
 	return nil
@@ -536,7 +536,7 @@ func (repo *Repository) UploadRepoFiles(doer *User, opts UploadRepoFileOptions)
 		RepoName:  repo.Name,
 		RepoName:  repo.Name,
 		RepoPath:  repo.RepoPath(),
 		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 fmt.Errorf("git push origin %s: %v", opts.NewBranch, err)
 	}
 	}