aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo/pull.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2022-02-06 20:01:47 +0100
committerGitHub <noreply@github.com>2022-02-06 20:01:47 +0100
commit3043eb36bfcd7ddf29202b958b91942826a8182b (patch)
treef6bfcb38648f07ff8132558ff826b8b1aac003ec /routers/web/repo/pull.go
parent8ae5e6d7fdd577ebf0807bf33a4cdeef35d254d9 (diff)
downloadgitea-3043eb36bfcd7ddf29202b958b91942826a8182b.tar.gz
gitea-3043eb36bfcd7ddf29202b958b91942826a8182b.zip
Delete old git.NewCommand() and use it as git.NewCommandContext() (#18552)
Diffstat (limited to 'routers/web/repo/pull.go')
-rw-r--r--routers/web/repo/pull.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go
index 0aea66ca67..9c575165a4 100644
--- a/routers/web/repo/pull.go
+++ b/routers/web/repo/pull.go
@@ -338,7 +338,7 @@ func PrepareMergedViewPullInfo(ctx *context.Context, issue *models.Issue) *git.C
}
if commitSHA != "" {
// Get immediate parent of the first commit in the patch, grab history back
- parentCommit, err = git.NewCommandContext(ctx, "rev-list", "-1", "--skip=1", commitSHA).RunInDir(ctx.Repo.GitRepo.Path)
+ parentCommit, err = git.NewCommand(ctx, "rev-list", "-1", "--skip=1", commitSHA).RunInDir(ctx.Repo.GitRepo.Path)
if err == nil {
parentCommit = strings.TrimSpace(parentCommit)
}