mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-24 03:29:50 +02: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:
1 parent
851bd18234
commit
3c6fc25a77
6 files changed
+9
-29
No files matched your search
@@ -479,10 +479,7 @@ func SyncPullMirror(ctx context.Context, repoID int64) bool {
|
||||
log.Error("SyncMirrors [repo: %-v]: unable to GetRefCommitID [ref_name: %s]: %v", m.Repo, result.refName, err)
|
||||
continue
|
||||
}
|
||||
objectFormat, err := git.GetObjectFormatOfRepo(ctx, m.Repo.RepoPath())
|
||||
if err != nil {
|
||||
log.Error("SyncMirrors [repo: %-v]: unable to GetHashTypeOfRepo: %v", m.Repo, err)
|
||||
}
|
||||
objectFormat := git.ObjectFormatFromName(m.Repo.ObjectFormatName)
|
||||
notify_service.SyncPushCommits(ctx, m.Repo.MustOwner(ctx), m.Repo, &repo_module.PushUpdateOptions{
|
||||
RefFullName: result.refName,
|
||||
OldCommitID: objectFormat.EmptyObjectID().String(),
|
||||
|
||||
Reference in new issue
Block a user