make repo close nil-safe#760
Conversation
Current Aviator status
This PR was merged using Aviator (commit e26a45a).
See the real-time status of this PR on the
Aviator webapp.
Use the Aviator Chrome Extension
to see the status of your PR within GitHub.
|
There was a problem hiding this comment.
Code Review
This pull request simplifies the deferred repository cleanup in cmd/av/main.go by delegating the nil-safety check directly to the Close method of the Repo struct in internal/git/git.go. I have no feedback to provide as there are no review comments.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
✅ FlexReview StatusCommon Owner:
Review SLO: |
| startTime := time.Now() | ||
| colors.SetupBackgroundColorTypeFromEnv() | ||
| defer func() { | ||
| if cachedRepo != nil { |
There was a problem hiding this comment.
we don't need cachedRepo null check?
There was a problem hiding this comment.
yeah, Close() checks r == nil itself now so we don't need it here
follow-up to #759, defensive nil guard on Repo.Close per review