Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions specs/001-git-worktree-wrapper/contracts/cli-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ gww pull

**Behavior**:
1. Verify each `path` exists and is a directory
2. Recursively scan each directory for git repositories and worktrees (paths where `.git` exists; submodules excluded). Do not descend into repository or worktree interiors—each repo/worktree is treated as a single unit. Merge and deduplicate repo lists by resolved path. During the scan, when not `--quiet`, output the current examining directory to stderr on a single line (overwriting), updating at most once per second; clear the line after the scan completes.
2. Recursively scan each directory for git repositories and worktrees (paths where `.git` exists; submodules excluded). Do not descend into repository or worktree interiors—each repo/worktree is treated as a single unit. Merge and deduplicate repo lists by resolved path.
3. Classify each repo as **source** or **worktree**. Expected path: sources use `resolve_source_path`; worktrees use `resolve_worktree_path` (branch from current branch; detached HEAD worktrees are skipped).
4. **If `--inplace`**:
- First pass: for each worktree whose path differs, move to new path and run `git worktree repair` in its source (at current path).
Expand All @@ -255,7 +255,6 @@ gww pull

**Output**:
- Success: Print summary to stdout
- Progress: When not `--quiet`, during directory scan print current examining folder to stderr on a single line (at most once per second); clear the line after the scan
- Error: Print error message to stderr

**Examples**:
Expand Down
2 changes: 1 addition & 1 deletion specs/001-git-worktree-wrapper/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Users can migrate existing repositories from old locations to new locations base
**Acceptance Criteria**:
- Command: `gww migrate <path>... [--dry-run] [--copy | --inplace]`
- Accept one or more paths; verify each exists and is a directory
- Recursively scan each directory for git repositories and worktrees (exclude submodules); do not descend into repository or worktree interiors (treat each as a single unit). Merge and deduplicate repo lists. During the scan, when not quiet: output current examining folder to stderr on a single line, updating at most once per second; clear the line after the scan.
- Recursively scan each directory for git repositories and worktrees (exclude submodules); do not descend into repository or worktree interiors (treat each as a single unit). Merge and deduplicate repo lists.
- Classify each repo as source or worktree; expected path: sources via `resolve_source_path`, worktrees via `resolve_worktree_path` (branch from current branch; skip detached HEAD worktrees)
- **--inplace**: First pass move worktrees and run `git worktree repair` in each source; second pass move sources and run repair in moved sources that had worktrees; then recursively clean empty source folders (vacated dirs and empty parents up to input roots). Dry-run outputs destination or "Already at target".
- **--copy** (default): List sources and worktrees; validate destinations; copy sources then worktrees (symbolic links copied as symlinks, not resolved); run `git worktree repair` to recover relations; report summary. No folder cleanup.
Expand Down
Loading