aboutsummaryrefslogtreecommitdiffstats
path: root/services/pull
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2024-03-11 05:30:36 +0800
committerGitHub <noreply@github.com>2024-03-10 22:30:36 +0100
commit3c6fc25a77c37d50686caa495d27a31dcef7f75f (patch)
treebaee1d20d877cdfcf6c65e6784068ea86c85e17b /services/pull
parent851bd18234ff3de4c603c57c3b380eb5495d8eb7 (diff)
downloadgitea-3c6fc25a77c37d50686caa495d27a31dcef7f75f.tar.gz
gitea-3c6fc25a77c37d50686caa495d27a31dcef7f75f.zip
Use repo object format name instead of detecting from git repository (#29702)
It's unnecessary to detect the repository object format from git repository. Just use the repository's object format name.
Diffstat (limited to 'services/pull')
-rw-r--r--services/pull/pull.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/pull/pull.go b/services/pull/pull.go
index be3d25d20a..9133a72acf 100644
--- a/services/pull/pull.go
+++ b/services/pull/pull.go
@@ -337,7 +337,7 @@ func AddTestPullRequestTask(doer *user_model.User, repoID int64, branch string,
}
if err == nil {
for _, pr := range prs {
- objectFormat, _ := git.GetObjectFormatOfRepo(ctx, pr.BaseRepo.RepoPath())
+ objectFormat := git.ObjectFormatFromName(pr.BaseRepo.ObjectFormatName)
if newCommitID != "" && newCommitID != objectFormat.EmptyObjectID().String() {
changed, err := checkIfPRContentChanged(ctx, pr, oldCommitID, newCommitID)
if err != nil {