Skip to content

feat: automatically create default branch worktree on init#2

Merged
tinmancoding merged 2 commits into
mainfrom
feature-auto-create-default
Jul 30, 2025
Merged

feat: automatically create default branch worktree on init#2
tinmancoding merged 2 commits into
mainfrom
feature-auto-create-default

Conversation

@tinmancoding
Copy link
Copy Markdown
Owner

Summary

  • Automatically detects and creates a worktree for the default branch when
    initializing a repository
  • Sets up upstream tracking for the created worktree branch
  • Gracefully handles edge cases like missing default branches or empty repositories

Test plan

  • Unit tests for default branch detection logic
  • Integration tests for automatic worktree creation
  • Tests for upstream tracking setup
  • Tests for graceful fallback on failures
  • All existing tests pass

🤖 Generated with opencode

tinmancoding and others added 2 commits July 29, 2025 00:27
- Automatically detect and create a worktree for the default branch during repository initialization
- Support repositories with different default branches (main, master, develop, etc.)
- Set up proper upstream tracking for the created default branch worktree
- Handle edge cases gracefully (empty repos, detection failures) with warnings
- Fix integration and unit tests to match correct worktree directory structure
- All 303 tests pass with comprehensive coverage of the new feature

🤖 Generated with [opencode](https://opencode.ai)

Co-Authored-By: opencode <noreply@opencode.ai>
…ting

- Remove hardcoded model specification from opencode.json
- Add GIT_ERROR exit code for git-related failures
- Enhance file system service interface with chdir method
- Improve mock logger service with log substring matching
- Add comprehensive unit tests for default branch detection logic
- Add integration tests for automatic worktree creation feature

🤖 Generated with [opencode](https://opencode.ai)

Co-Authored-By: opencode <noreply@opencode.ai>
@tinmancoding tinmancoding merged commit 96575b8 into main Jul 30, 2025
3 checks passed
@tinmancoding tinmancoding deleted the feature-auto-create-default branch July 30, 2025 12:59
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