mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-28 13:20:20 +08:00
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.
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user