mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Remove context from git struct (#33793)
Argument is moved from struct init in command run, which lets us remove context from struct.
This commit is contained in:
@@ -242,7 +242,7 @@ func GetMergedBaseCommitID(ctx *context.Context, issue *issues_model.Issue) stri
|
||||
}
|
||||
if commitSHA != "" {
|
||||
// Get immediate parent of the first commit in the patch, grab history back
|
||||
parentCommit, _, err = git.NewCommand(ctx, "rev-list", "-1", "--skip=1").AddDynamicArguments(commitSHA).RunStdString(&git.RunOpts{Dir: ctx.Repo.GitRepo.Path})
|
||||
parentCommit, _, err = git.NewCommand("rev-list", "-1", "--skip=1").AddDynamicArguments(commitSHA).RunStdString(ctx, &git.RunOpts{Dir: ctx.Repo.GitRepo.Path})
|
||||
if err == nil {
|
||||
parentCommit = strings.TrimSpace(parentCommit)
|
||||
}
|
||||
|
Reference in New Issue
Block a user