diff options
Diffstat (limited to 'services/repository/push.go')
-rw-r--r-- | services/repository/push.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/services/repository/push.go b/services/repository/push.go index cdf030396..4b574e344 100644 --- a/services/repository/push.go +++ b/services/repository/push.go @@ -206,12 +206,12 @@ func pushUpdates(optsList []*repo_module.PushUpdateOptions) error { return fmt.Errorf("newCommit.CommitsBeforeUntil: %w", err) } - isForce, err := repo_module.IsForcePush(ctx, opts) + isForcePush, err := newCommit.IsForcePush(opts.OldCommitID) if err != nil { - log.Error("isForcePush %s:%s failed: %v", repo.FullName(), branch, err) + log.Error("IsForcePush %s:%s failed: %v", repo.FullName(), branch, err) } - if isForce { + if isForcePush { log.Trace("Push %s is a force push", opts.NewCommitID) cache.Remove(repo.GetCommitsCountCacheKey(opts.RefName(), true)) |