The command 'berg repo info OWNER/REPO' was failing with "No repository
found in the current path" even when OWNER/REPO was provided as argument.
Root cause: Using .unwrap_or() with a fallback containing a ? operator
caused the git repo check to execute and propagate errors even when the
argument was successfully provided.
Solution: Replace with if-let pattern for lazy evaluation, matching the
working implementation in the issue list command. Now ctx.owner_repo()
only executes when OWNER/REPO is not provided.
Added regression test repoInfoWithoutGitRepo that verifies the command
works from outside a git repository when OWNER/REPO argument is provided.
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com
The command 'berg repo info OWNER/REPO' was failing with "No repository
found in the current path" even when OWNER/REPO was provided as argument.
Root cause: Using .unwrap_or() with a fallback containing a ? operator
caused the git repo check to execute and propagate errors even when the
argument was successfully provided.
Solution: Replace with if-let pattern for lazy evaluation, matching the
working implementation in the issue list command. Now ctx.owner_repo()
only executes when OWNER/REPO is not provided.
Added regression test repoInfoWithoutGitRepo that verifies the command
works from outside a git repository when OWNER/REPO argument is provided.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>