Skip to content

Add Push.SetUpstream option and worktree support#132

Merged
unknwon merged 3 commits intov2from
push-upstream-and-worktree
Feb 15, 2026
Merged

Add Push.SetUpstream option and worktree support#132
unknwon merged 3 commits intov2from
push-upstream-and-worktree

Conversation

@unknwon
Copy link
Member

@unknwon unknwon commented Feb 15, 2026

Summary

  • Add SetUpstream field to PushOptions for git push -u
  • Add WorktreeAdd and WorktreeRemove methods with options structs following existing conventions
  • Capitalize "Git" in all "underlying Git" doc comments for consistency across the codebase

Test plan

  • TestRepository_Push — existing + new SetUpstream: true case
  • TestRepository_WorktreeAdd — detached HEAD and new branch cases
  • TestRepository_WorktreeRemove — clean removal and force removal of dirty worktree

- Add SetUpstream field to PushOptions for `git push -u`
- Add WorktreeAdd and WorktreeRemove methods with options
- Capitalize "Git" in all "underlying Git" doc comments for consistency
- Add tests for new functionality

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@unknwon unknwon requested a review from a team as a code owner February 15, 2026 19:28
unknwon and others added 2 commits February 15, 2026 14:29
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@unknwon unknwon merged commit d5f694f into v2 Feb 15, 2026
4 checks passed
@unknwon unknwon deleted the push-upstream-and-worktree branch February 15, 2026 19:33
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