Delete old git.NewCommand() and use it as git.NewCommandContext() (#18552)
This commit is contained in:
parent
8ae5e6d7fd
commit
3043eb36bf
74 changed files with 258 additions and 263 deletions
|
@ -81,7 +81,7 @@ func InitWiki(ctx context.Context, repo *repo_model.Repository) error {
|
|||
return fmt.Errorf("InitRepository: %v", err)
|
||||
} else if err = repo_module.CreateDelegateHooks(repo.WikiPath()); err != nil {
|
||||
return fmt.Errorf("createDelegateHooks: %v", err)
|
||||
} else if _, err = git.NewCommandContext(ctx, "symbolic-ref", "HEAD", git.BranchPrefix+"master").RunInDir(repo.WikiPath()); err != nil {
|
||||
} else if _, err = git.NewCommand(ctx, "symbolic-ref", "HEAD", git.BranchPrefix+"master").RunInDir(repo.WikiPath()); err != nil {
|
||||
return fmt.Errorf("unable to set default wiki branch to master: %v", err)
|
||||
}
|
||||
return nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue