Skip to content

feat(get): Add branch checkout mode#46

Open
abhinav wants to merge 1 commit into
kunchenguid:mainfrom
abhinav:get-branch-mode
Open

feat(get): Add branch checkout mode#46
abhinav wants to merge 1 commit into
kunchenguid:mainfrom
abhinav:get-branch-mode

Conversation

@abhinav

@abhinav abhinav commented Jun 29, 2026

Copy link
Copy Markdown

Allow treehouse get -b <branch> and treehouse get --lease -b <branch>
to create a new local branch after acquisition.
The worktree still enters through the existing detached acquisition path,
then checks out the requested branch at the acquired HEAD.

Preserve existing dirty-exit behavior for plain treehouse get.
Branch mode keeps a dirty declined-cleanup worktree on the branch,
while clean returns still detach and restore the pool state.

Allow `treehouse get -b <branch>` and
`treehouse get --lease -b <branch>` to create a new local branch
after acquisition.
The worktree still enters through the existing detached acquisition
path,
then checks out the requested branch at the acquired `HEAD`.

Preserve existing dirty-exit behavior for plain `treehouse get`.
Branch mode keeps a dirty declined-cleanup worktree on the branch,
while clean returns still detach and restore the pool state.
@abhinav

abhinav commented Jun 29, 2026

Copy link
Copy Markdown
Author

This change is part of the following stack:

Change managed by git-spice.

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