Skip to content

Fix default branch/remote pathway#27

Merged
bjester merged 2 commits intomainfrom
fix-default
Mar 29, 2026
Merged

Fix default branch/remote pathway#27
bjester merged 2 commits intomainfrom
fix-default

Conversation

@bjester
Copy link
Copy Markdown
Owner

@bjester bjester commented Mar 29, 2026

Summary

Running gh-worktree create some-branch should have been basing the branch off the default remote and default branch of the repo on Github. It was erroring out and this fixes that.

Traceback (most recent call last):
  File "__main__.py", line 4, in <module>
  File "gh_worktree/cli.py", line 7, in main
  File "fire/core.py", line 135, in Fire
  File "fire/core.py", line 468, in _Fire
  File "fire/core.py", line 684, in _CallAndUpdateTrace
  File "gh_worktree/commands/create.py", line 40, in __call__
  File "gh_worktree/runtime.py", line 33, in get_remote
ValueError: Must provide either owner_name or name
[PYI-164413:ERROR] Failed to execute script '__main__' due to unhandled exception!

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 29, 2026

🎉 Build Assets are ready!

Type File Checksum
Wheel gh_worktree-0.3.0-py3-none-any.whl a755256dbe2fef2d7b373f2e8e3cf927d834b595e365c639d371828c3f89ba50
PEX gh-worktree.pex 9a01b051ed29ca1308be2257631a0aa89575ce224a5f0067bd0260e61ae6923e
Binary gh-worktree c085903bb91cc6964fd8a5fc7c9e5cb76b8c19bcea9b8cd5d00a4b569955f6ad

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the create command to use a default remote when one is not explicitly provided. The test suite has been updated to reflect this change, including the addition of a test case for branch-only references. A review comment suggests improving test robustness by explicitly asserting that the default remote logic is bypassed when a remote is provided in the reference.

Comment thread tests/commands/test_create.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@bjester bjester merged commit f823dae into main Mar 29, 2026
8 checks passed
@bjester bjester deleted the fix-default branch April 18, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant