# Use errors.Is in annotateLeaseFailure passthrough test

`bf2f402`→[main](/content/gh/entireio/git-sync/commits/main/index.html)·

Soph·2mo ago·1 file·+1 added/-1 removed

errorlint flagged the `!= err` comparison on a wrapped error. The
helper currently returns the input untouched on the non-lease branch
(so `==` works), but the contract is "pass through unchanged" — switch
to errors.Is so the test still passes if the helper ever wraps with a
non-lease annotation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

## Changes

1

- internal/gitproto

- Mpush_test.go+1/-1

```
412 unmodified lines

func TestAnnotateLeaseFailurePassesNonCommandStatusErrors(t *testing.T) {
	err := errors.New("network blew up")
	if got := annotateLeaseFailure(err); got != err {
		if got := annotateLeaseFailure(err); !errors.Is(got, err) {
			t.Fatalf("unrelated error should pass through unchanged, got %v", got)
		}
	}
}
```

Minternal/gitproto/push_test.go+1/-1
