From 5989671f87f0014a2356717dc7b49d3b1ef3c06f Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Mon, 8 Jun 2026 21:22:12 +0200 Subject: [PATCH] repository: deduplicate error handling in checkForOtherLocks --- internal/repository/lock_file.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/internal/repository/lock_file.go b/internal/repository/lock_file.go index ac83cd9e0..45685a165 100644 --- a/internal/repository/lock_file.go +++ b/internal/repository/lock_file.go @@ -185,11 +185,7 @@ func (l *lockHandle) checkForOtherLocks(ctx context.Context) error { return err } - if l.Exclusive { - return &alreadyLockedError{otherLock: lock} - } - - if !l.Exclusive && lock.Exclusive { + if l.Exclusive || lock.Exclusive { return &alreadyLockedError{otherLock: lock} }