Module: Ace::Git::Worktree
- Defined in:
- lib/ace/git/worktree.rb,
lib/ace/git/worktree/cli.rb,
lib/ace/git/worktree/version.rb,
lib/ace/git/worktree/configuration.rb,
lib/ace/git/worktree/atoms/git_command.rb,
lib/ace/git/worktree/cli/commands/list.rb,
lib/ace/git/worktree/cli/commands/prune.rb,
lib/ace/git/worktree/atoms/path_expander.rb,
lib/ace/git/worktree/cli/commands/config.rb,
lib/ace/git/worktree/cli/commands/create.rb,
lib/ace/git/worktree/cli/commands/remove.rb,
lib/ace/git/worktree/cli/commands/switch.rb,
lib/ace/git/worktree/atoms/slug_generator.rb,
lib/ace/git/worktree/models/worktree_info.rb,
lib/ace/git/worktree/molecules/pr_creator.rb,
lib/ace/git/worktree/commands/list_command.rb,
lib/ace/git/worktree/molecules/task_pusher.rb,
lib/ace/git/worktree/commands/prune_command.rb,
lib/ace/git/worktree/models/worktree_config.rb,
lib/ace/git/worktree/molecules/task_fetcher.rb,
lib/ace/git/worktree/atoms/task_id_extractor.rb,
lib/ace/git/worktree/commands/config_command.rb,
lib/ace/git/worktree/commands/create_command.rb,
lib/ace/git/worktree/commands/remove_command.rb,
lib/ace/git/worktree/commands/switch_command.rb,
lib/ace/git/worktree/molecules/config_loader.rb,
lib/ace/git/worktree/molecules/hook_executor.rb,
lib/ace/git/worktree/models/worktree_metadata.rb,
lib/ace/git/worktree/molecules/task_committer.rb,
lib/ace/git/worktree/molecules/worktree_lister.rb,
lib/ace/git/worktree/molecules/worktree_creator.rb,
lib/ace/git/worktree/molecules/worktree_remover.rb,
lib/ace/git/worktree/organisms/worktree_manager.rb,
lib/ace/git/worktree/cli/commands/shared_helpers.rb,
lib/ace/git/worktree/molecules/current_task_linker.rb,
lib/ace/git/worktree/molecules/task_status_updater.rb,
lib/ace/git/worktree/molecules/parent_task_resolver.rb,
lib/ace/git/worktree/organisms/task_worktree_orchestrator.rb
Overview
Main module for ace-git-worktree gem
This gem provides task-aware git worktree management capabilities integrated with the ACE task management system.
Key features:
-
Task-aware worktree creation with automatic metadata lookup
-
Integration with ace-task for task information
-
Configuration-driven naming conventions
-
Automated environment setup (mise trust)
-
Support for traditional worktree operations
Defined Under Namespace
Modules: Atoms, CLI, Commands, Configuration, Models, Molecules, Organisms
Constant Summary collapse
- VERSION =
'0.21.4'
Class Method Summary collapse
-
.commit_timeout ⇒ Integer
Timeout for git commit operations.
-
.config ⇒ Hash
Get configuration for ace-git-worktree Follows ADR-022: Configuration Default and Override Pattern Uses Ace::Support::Config.create() for configuration cascade resolution Thread-safe: uses mutex for initialization.
-
.default_timeout ⇒ Integer
Default timeout for general git operations.
-
.hook_timeout ⇒ Integer
Timeout for after_create hook commands.
-
.list_timeout ⇒ Integer
Timeout for worktree list operations.
-
.max_timeout ⇒ Integer
Maximum allowed timeout for any operation.
-
.remove_timeout ⇒ Integer
Timeout for worktree removal operations.
-
.reset_config! ⇒ Object
Reset configuration cache (mainly for testing) Thread-safe: uses mutex to prevent race conditions.
Class Method Details
.commit_timeout ⇒ Integer
Timeout for git commit operations
106 107 108 |
# File 'lib/ace/git/worktree.rb', line 106 def commit_timeout config.dig("timeouts", "commit") || 30 end |
.config ⇒ Hash
Get configuration for ace-git-worktree Follows ADR-022: Configuration Default and Override Pattern Uses Ace::Support::Config.create() for configuration cascade resolution Thread-safe: uses mutex for initialization
59 60 61 62 63 64 65 66 67 |
# File 'lib/ace/git/worktree.rb', line 59 def config # Fast path: return cached config if already initialized return @config if defined?(@config) && @config # Thread-safe initialization @config_mutex.synchronize do @config ||= load_config end end |
.default_timeout ⇒ Integer
Default timeout for general git operations
82 83 84 |
# File 'lib/ace/git/worktree.rb', line 82 def default_timeout config.dig("timeouts", "default") || 30 end |
.hook_timeout ⇒ Integer
Timeout for after_create hook commands
94 95 96 |
# File 'lib/ace/git/worktree.rb', line 94 def hook_timeout config.dig("timeouts", "hook") || 30 end |
.list_timeout ⇒ Integer
Timeout for worktree list operations
100 101 102 |
# File 'lib/ace/git/worktree.rb', line 100 def list_timeout config.dig("timeouts", "list") || 30 end |
.max_timeout ⇒ Integer
Maximum allowed timeout for any operation
88 89 90 |
# File 'lib/ace/git/worktree.rb', line 88 def max_timeout config.dig("timeouts", "max") || 300 end |
.remove_timeout ⇒ Integer
Timeout for worktree removal operations
112 113 114 |
# File 'lib/ace/git/worktree.rb', line 112 def remove_timeout config.dig("timeouts", "remove") || 30 end |
.reset_config! ⇒ Object
Reset configuration cache (mainly for testing) Thread-safe: uses mutex to prevent race conditions
71 72 73 74 75 |
# File 'lib/ace/git/worktree.rb', line 71 def reset_config! @config_mutex.synchronize do @config = nil end end |