mirror of
https://github.com/go-gitea/gitea
synced 2025-07-13 22:17:20 +00:00
Delete old git.NewCommand() and use it as git.NewCommandContext() (#18552)
This commit is contained in:
@ -205,7 +205,7 @@ func ProcRecive(ctx *context.PrivateContext, opts *private.HookOptions) []privat
|
||||
}
|
||||
|
||||
if !forcePush {
|
||||
output, err := git.NewCommandContext(ctx, "rev-list", "--max-count=1", oldCommitID, "^"+opts.NewCommitIDs[i]).RunInDirWithEnv(repo.RepoPath(), os.Environ())
|
||||
output, err := git.NewCommand(ctx, "rev-list", "--max-count=1", oldCommitID, "^"+opts.NewCommitIDs[i]).RunInDirWithEnv(repo.RepoPath(), os.Environ())
|
||||
if err != nil {
|
||||
log.Error("Unable to detect force push between: %s and %s in %-v Error: %v", oldCommitID, opts.NewCommitIDs[i], repo, err)
|
||||
ctx.JSON(http.StatusInternalServerError, private.Response{
|
||||
|
Reference in New Issue
Block a user