Skip to content

feat(list): add daft list / git worktree-list command#264

Merged
avihut merged 15 commits intomasterfrom
feat/list
Feb 24, 2026
Merged

feat(list): add daft list / git worktree-list command#264
avihut merged 15 commits intomasterfrom
feat/list

Conversation

@avihut
Copy link
Owner

@avihut avihut commented Feb 24, 2026

Summary

  • Add daft list / git worktree-list command that displays a rich table of all active worktrees with branch name, relative path, ahead/behind counts vs base branch, dirty marker, last commit age, and last commit subject
  • Support --json flag for machine-readable output and --verbose for debug logging
  • Full wiring: command routing, gwtls shortcut, shell completions (bash/zsh/fish/fig), man pages, CLI docs, VitePress sidebar, xtask registration, doctor symlink checks, RPM packaging

Test Plan

  • 5 unit tests for porcelain parsing (basic, bare, detached, empty, mixed)
  • 13 integration tests covering basic listing, current marker, dirty marker, JSON output, detached HEAD, ahead/behind, outside-repo error, help, single worktree, many worktrees, commit subject, subdirectory, JSON ahead/behind
  • All 246 integration tests pass (both default and gitoxide backends)
  • 386 unit tests pass
  • mise run clippy -- zero warnings
  • mise run fmt -- clean
  • mise run man:verify -- up to date

🤖 Generated with Claude Code

@avihut avihut added this to the v1.1.0 milestone Feb 24, 2026
@avihut avihut added the feat New feature label Feb 24, 2026
@avihut avihut self-assigned this Feb 24, 2026
avihut and others added 12 commits February 24, 2026 10:01
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add src/core/worktree/list.rs with WorktreeInfo struct and
collect_worktree_info() for enriched worktree data (ahead/behind,
dirty status, last commit info). Includes parse_porcelain() parser
with unit tests for basic, bare-skip, detached-head, and mixed cases.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add src/commands/list.rs with Args struct (--json, --verbose flags),
table rendering using tabled Builder with Style::blank(), column
truncation, color formatting (cyan current marker, yellow dirty,
green ahead, red behind, dim old age), and JSON output mode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… handling

- Use get_default_branch_local() instead of resolve_initial_branch() for
  base branch detection (consistent with prune/branch_delete)
- Enable tabled ansi feature for correct column width with colored text
- Fix canonicalization asymmetry (fallback instead of error propagation)
- Fix misleading doc comment on WorktreeInfo.name field

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ackaging

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
avihut and others added 3 commits February 24, 2026 10:03
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…mmit heading

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@avihut avihut merged commit 4ce0205 into master Feb 24, 2026
6 checks passed
@avihut avihut deleted the feat/list branch February 24, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant