Skip to content

Add main repository to session list and enable switching#1

Merged
ksred merged 1 commit intomainfrom
feature/add-main-to-switch-list
Jul 2, 2025
Merged

Add main repository to session list and enable switching#1
ksred merged 1 commit intomainfrom
feature/add-main-to-switch-list

Conversation

@ksred
Copy link
Owner

@ksred ksred commented Jul 2, 2025

This commit implements the ability to include the main repository in the
ccswitch session list and allows users to switch back to it.

Changes:

  • Modified GetSessionsFromWorktrees to include the main repository as "main"
  • Added GetMainRepoPath function to find the main repository from any worktree
  • Updated session manager to use main repository path for listing all worktrees
  • Replaced monolithic main.go with modular entry point using refactored code
  • Added comprehensive test coverage for multiple packages:
    • 100% coverage for internal/errors and internal/utils
    • 83.3% coverage for internal/config
    • New tests for git repository functions and worktree handling
  • Removed old test files that were incompatible with refactored structure

The main repository now appears in ccswitch list output and users can
switch to it using ccswitch switch main, making navigation between the
main repository and worktrees seamless.

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

This commit implements the ability to include the main repository in the
ccswitch session list and allows users to switch back to it.

Changes:
- Modified GetSessionsFromWorktrees to include the main repository as "main"
- Added GetMainRepoPath function to find the main repository from any worktree
- Updated session manager to use main repository path for listing all worktrees
- Replaced monolithic main.go with modular entry point using refactored code
- Added comprehensive test coverage for multiple packages:
  - 100% coverage for internal/errors and internal/utils
  - 83.3% coverage for internal/config
  - New tests for git repository functions and worktree handling
- Removed old test files that were incompatible with refactored structure

The main repository now appears in `ccswitch list` output and users can
switch to it using `ccswitch switch main`, making navigation between the
main repository and worktrees seamless.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ksred ksred merged commit c55bc05 into main Jul 2, 2025
4 of 5 checks passed
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