Skip to content

feat: add git-worktree-fetch command to update worktree branches#66

Merged
avihut merged 3 commits intodevelopfrom
daft-11/worktree-fetch
Jan 23, 2026
Merged

feat: add git-worktree-fetch command to update worktree branches#66
avihut merged 3 commits intodevelopfrom
daft-11/worktree-fetch

Conversation

@avihut
Copy link
Owner

@avihut avihut commented Jan 23, 2026

Summary

  • Add new git-worktree-fetch command that updates worktree branches from their remote tracking branches
  • Navigate to each target worktree and run git pull with configurable options
  • Support updating current worktree, specific worktrees, or all worktrees (--all)
  • Skip worktrees with uncommitted changes (override with --force)
  • Add config-based defaults via daft.fetch.args (default: --ff-only)

Test plan

  • Run cargo clippy -- -D warnings - no warnings
  • Run cargo fmt -- --check - properly formatted
  • Run cargo test --lib - all 78 unit tests pass
  • Verify git-worktree-fetch --help works correctly
  • Verify man page generation works
  • Run integration tests with just test-integration-fetch

Fixes #11

🤖 Generated with Claude Code

Add a new command that updates worktree branches from their remote tracking
branches by navigating to each target worktree and running `git pull`.

Features:
- Update current worktree, specific worktrees, or all worktrees (--all)
- Skip worktrees with uncommitted changes (override with --force)
- Dry-run mode to preview actions (--dry-run)
- Configurable pull behavior: --rebase, --autostash, --ff-only, --no-ff-only
- Pass-through arguments to git pull (-- <args>)
- Config-based defaults via daft.fetch.args (default: --ff-only)

Fixes #11

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@avihut avihut self-assigned this Jan 23, 2026
@avihut avihut added the enhancement New feature or request label Jan 23, 2026
@avihut avihut added this to the v1.0.0 milestone Jan 23, 2026
@avihut avihut linked an issue Jan 23, 2026 that may be closed by this pull request
avihut and others added 2 commits January 23, 2026 18:48
Add missing symlinks for git-worktree-fetch and git-worktree-carry
commands in the CI workflow to ensure integration tests can find
these commands.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The get_all_worktrees function was including the bare repository
directory itself when processing git worktree list output. Fixed
by properly parsing the porcelain format and checking for the
'bare' indicator line that follows bare repository entries.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@avihut avihut merged commit f7d61bd into develop Jan 23, 2026
3 checks passed
@avihut avihut deleted the daft-11/worktree-fetch branch January 23, 2026 17:55
avihut added a commit that referenced this pull request Jan 24, 2026
* feat: add git-worktree-fetch command to update worktree branches

Add a new command that updates worktree branches from their remote tracking
branches by navigating to each target worktree and running `git pull`.

Features:
- Update current worktree, specific worktrees, or all worktrees (--all)
- Skip worktrees with uncommitted changes (override with --force)
- Dry-run mode to preview actions (--dry-run)
- Configurable pull behavior: --rebase, --autostash, --ff-only, --no-ff-only
- Pass-through arguments to git pull (-- <args>)
- Config-based defaults via daft.fetch.args (default: --ff-only)

Fixes #11

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(ci): add git-worktree-fetch and git-worktree-carry symlinks

Add missing symlinks for git-worktree-fetch and git-worktree-carry
commands in the CI workflow to ensure integration tests can find
these commands.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(fetch): skip bare repositories in --all mode

The get_all_worktrees function was including the bare repository
directory itself when processing git worktree list output. Fixed
by properly parsing the porcelain format and checking for the
'bare' indicator line that follows bare repository entries.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update a Worktree Branch You're not Currently On

1 participant