-
Notifications
You must be signed in to change notification settings - Fork 67
Closed
Description
Summary
Add a flag to the git gtr new command to skip executing hooks, similar to how --no-copy skips file copying and --no-fetch skips git fetch.
Use Case
The new command already supports flags to skip optional operations:
--no-copy- Skip file copying--no-fetch- Skip git fetch
However, there's no way to skip hooks when creating a worktree. This would be useful for:
- Quick worktree creation - When you need a worktree fast and don't need the post-setup.
- Debugging - Testing worktree creation without hook side effects
- Consistency with git - Git itself uses
--no-verifyto skip hooks on commit/push/merge
Proposed Solution
Add a flag that skips hook execution in cmd_create().
# Current: hooks always run
git gtr new my-feature
# Proposed: skip hooks
git gtr new my-feature --<flag>Naming Options
| Flag | Pros | Cons |
|---|---|---|
--no-hooks |
Consistent with --no-copy/--no-fetch pattern; concise |
Inconsistent with git's --no-verify convention |
--no-verify |
Matches git's convention (git commit --no-verify) |
gtr hooks aren't verification hooks; could be misleading |
--no-post-create |
Explicit about which hook is skipped | Verbose; only applies to current hook; would need separate flags for future hooks |
Compatibility
- Backwards compatible - Adds a new optional flag; existing behavior unchanged
- Cross-platform - No platform-specific concerns; pure Bash flag parsing
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels