aboutsummaryrefslogtreecommitdiffstats
path: root/services/pull/check.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/pull/check.go')
-rw-r--r--services/pull/check.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/services/pull/check.go b/services/pull/check.go
index dd6c3ed230..f4dd332b14 100644
--- a/services/pull/check.go
+++ b/services/pull/check.go
@@ -222,10 +222,7 @@ func getMergeCommit(ctx context.Context, pr *issues_model.PullRequest) (*git.Com
}
defer gitRepo.Close()
- objectFormat, err := gitRepo.GetObjectFormat()
- if err != nil {
- return nil, fmt.Errorf("%-v GetObjectFormat: %w", pr.BaseRepo, err)
- }
+ objectFormat := git.ObjectFormatFromName(pr.BaseRepo.ObjectFormatName)
// Get the commit from BaseBranch where the pull request got merged
mergeCommit, _, err := git.NewCommand(ctx, "rev-list", "--ancestry-path", "--merges", "--reverse").