Missed error check

This commit is contained in:
Zach Musgrave
2023-02-08 17:45:07 -08:00
parent a6317196f3
commit d7d2b2a665

View File

@@ -406,7 +406,9 @@ OPTIMISTIC_RETRY:
switch remoteRef.Ref.GetType() {
case ref.BranchRefType:
err := rrd.createNewBranchFromRemote(ctx, remoteRef, trackingRef)
if err != nil {
if errors.Is(err, datas.ErrOptimisticLockFailed) {
continue OPTIMISTIC_RETRY
} else if err != nil {
return nil, err
}