Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

feat: Add `(matches main)` state to `wt list`

Maximilian Roosfe759c779700
diff --git a/README.md b/README.md
index f7e62723f..191162e04 100644
--- a/README.md
+++ b/README.md
@@ -101,6 +101,26 @@ These trade manual control for automation. For fine-grained control, use `git wo
See `wt --help` for details.
+<details>
+<summary>Worktree states in <code>wt list</code></summary>
+
+The State column shows worktree status. **Dimmed rows** indicate worktrees with no marginal information beyond main (no unique work).
+
+**Dimming logic:** Lines dim when they provide no marginal information - either no commits ahead OR working tree matches main exactly. This focuses attention on worktrees containing work.
+
+| State | Meaning | Dimmed? |
+|-------|---------|---------|
+| **(no commits)** | No commits on top of main AND no uncommitted changes (`ahead == 0` and `working_tree_diff == (0, 0)`). | Yes |
+| **(matches main)** | Working tree contents identical to main branch, regardless of commit history (`working_tree_diff_with_main == (0, 0)`). | Yes |
+| **(conflicts)** | Merge conflicts detected with main | No |
+| **[MERGING]**, **[REBASING]**, etc. | Git operation in progress | No |
+| **(bare)** | Bare worktree (no working directory) | No |
+| **(locked)**, **(prunable)** | Git worktree management states | No |
+
+Both dimming conditions use OR logic: either is sufficient to dim. "(no commits)" means clean worktree with no commits ahead. "(matches main)" means the current working tree state is identical to main, even if commit history differs (e.g., commits were made but later reverted).
+
+</details>
+
## Configuration
```bash
diff --git a/src/commands/list/layout.rs b/src/commands/list/layout.rs
index ccda959b4..b91c42256 100644
--- a/src/commands/list/layout.rs
+++ b/src/commands/list/layout.rs
@@ -715,6 +715,7 @@ mod tests {
behind: 2,
},
working_tree_diff: (100, 50),
+ working_tree_diff_with_main: (0, 0),
branch_diff: BranchDiffTotals { diff: (200, 30) },
is_primary: false,
upstream: UpstreamStatus::from_parts(Some("origin".to_string()), 4, 0),
@@ -788,6 +789,7 @@ mod tests {
behind: 10,
},
working_tree_diff: (100, 50),
+ working_tree_diff_with_main: (0, 0),
branch_diff: BranchDiffTotals { diff: (200, 30) },
is_primary: false,
upstream: UpstreamStatus::from_parts(Some("origin".to_string()), 4, 2),
@@ -872,6 +874,7 @@ mod tests {
behind: 0,
},
working_tree_diff: (0, 0),
+ working_tree_diff_with_main: (0, 0),
branch_diff: BranchDiffTotals { diff: (0, 0) },
is_primary: true, // Primary worktree: no ahead/behind shown
upstream: UpstreamStatus::default(),
@@ -948,10 +951,11 @@ mod tests {
behind: 0,
},
working_tree_diff: (0, 0), // Hidden: no dirty changes
+ working_tree_diff_with_main: (0, 0),
branch_diff: BranchDiffTotals { diff: (0, 0) }, // Hidden: no diff
- is_primary: true, // Hidden: no ahead/behind for primary
- upstream: UpstreamStatus::default(), // Hidden: no upstream
- worktree_state: None, // Hidden: no state
+ is_primary: true, // Hidden: no ahead/behind for primary
+ upstream: UpstreamStatus::default(), // Hidden: no upstream
+ worktree_state: None, // Hidden: no state
pr_status: None,
has_conflicts: false,
display: DisplayFields::default(),
diff --git a/src/commands/list/model.rs b/src/commands/list/model.rs
index 0bef76da7..40a08a2d3 100644
--- a/src/commands/list/model.rs
+++ b/src/commands/list/model.rs
@@ -27,6 +27,7 @@ pub struct WorktreeInfo {
#[serde(flatten)]
pub counts: AheadBehind,
pub working_tree_diff: (usize, usize),
+ pub working_tree_diff_with_main: (usize, usize),
#[serde(flatten)]
pub branch_diff: BranchDiffTotals,
pub is_primary: bool,
@@ -318,6 +319,11 @@ impl WorktreeInfo {
let counts = AheadBehind::compute(&wt_repo, base_branch, &wt.head)?;
let working_tree_diff = wt_repo.working_tree_diff_stats()?;
+ let working_tree_diff_with_main = if let Some(base) = base_branch {
+ wt_repo.working_tree_diff_vs_ref(base)?
+ } else {
+ (0, 0)
+ };
let branch_diff = BranchDiffTotals::compute(&wt_repo, base_branch, &wt.head)?;
let upstream = UpstreamStatus::calculate(&wt_repo, wt.branch.as_deref(), &wt.head)?;
@@ -347,6 +353,7 @@ impl WorktreeInfo {
commit,
counts,
working_tree_diff,
+ working_tree_diff_with_main,
branch_diff,
is_primary,
upstream,
diff --git a/src/commands/list/render.rs b/src/commands/list/render.rs
index 576df2e0d..f5f937c25 100644
--- a/src/commands/list/render.rs
+++ b/src/commands/list/render.rs
@@ -236,6 +236,16 @@ pub fn format_all_states(item: &ListItem) -> String {
// Worktree-specific states
if let Some(info) = item.worktree_info() {
+ // Check for "no commits" state - no commits ahead AND no uncommitted changes
+ if !info.is_primary && item.counts().ahead == 0 && info.working_tree_diff == (0, 0) {
+ states.push("(no commits)".to_string());
+ }
+
+ // Check for "matches main" state - working tree contents identical to main branch
+ if !info.is_primary && info.working_tree_diff_with_main == (0, 0) {
+ states.push("(matches main)".to_string());
+ }
+
if let Some(state) = info.worktree_state.as_ref() {
states.push(format!("[{}]", state));
}
@@ -352,15 +362,38 @@ fn push_header_at(line: &mut StyledLine, label: &str, width: usize, position: us
}
}
-/// Check if a branch is potentially removable (nothing ahead, no uncommitted changes)
+/// Check if a worktree/branch has marginal information (dim the line)
+///
+/// Dimming principle: A line is dimmed when it provides no marginal information
+/// beyond what's already in the main branch. This helps focus attention on
+/// worktrees that contain work.
+///
+/// Dims when (using OR logic):
+/// - No commits AND clean working tree (ahead == 0 AND working_tree_diff == (0, 0)):
+/// The worktree has no commits ahead and no uncommitted changes
+/// - Working tree matches main (working_tree_diff_with_main == (0, 0)):
+/// The working tree contents are identical to main, regardless of commit history
+///
+/// Either condition alone is sufficient to dim, as both indicate "no unique work here".
fn is_potentially_removable(item: &ListItem) -> bool {
+ if item.is_primary() {
+ return false;
+ }
+
let counts = item.counts();
- let wt_diff = item
- .worktree_info()
- .map(|info| info.working_tree_diff)
- .unwrap_or((0, 0));
- !item.is_primary() && counts.ahead == 0 && wt_diff == (0, 0)
+ if let Some(info) = item.worktree_info() {
+ // Condition 1: No commits ahead AND no uncommitted changes
+ let no_commits_and_clean = counts.ahead == 0 && info.working_tree_diff == (0, 0);
+
+ // Condition 2: Working tree matches main (regardless of commit history)
+ let matches_main = info.working_tree_diff_with_main == (0, 0);
+
+ no_commits_and_clean || matches_main
+ } else {
+ // For branches without worktrees, just check if no commits ahead
+ counts.ahead == 0
+ }
}
/// Render a list item (worktree or branch) as a formatted line
diff --git a/src/git.rs b/src/git.rs
index 9740615bf..3481cd6d0 100644
--- a/src/git.rs
+++ b/src/git.rs
@@ -687,6 +687,17 @@ impl Repository {
parse_numstat(&stdout)
}
+ /// Get line diff statistics between working tree and a specific ref.
+ ///
+ /// This compares the current working tree contents (including uncommitted changes)
+ /// against the specified ref, regardless of what HEAD points to.
+ ///
+ /// Returns (added_lines, deleted_lines).
+ pub fn working_tree_diff_vs_ref(&self, ref_name: &str) -> Result<(usize, usize), GitError> {
+ let stdout = self.run_command(&["diff", "--numstat", ref_name])?;
+ parse_numstat(&stdout)
+ }
+
/// Get line diff statistics between two refs (using three-dot diff for merge base).
///
/// Returns (added_lines, deleted_lines).
diff --git a/tests/snapshots/integration__integration_tests__list__json_with_display_fields.snap b/tests/snapshots/integration__integration_tests__list__json_with_display_fields.snap
index 247813e9b..6ce2b48df 100644
--- a/tests/snapshots/integration__integration_tests__list__json_with_display_fields.snap
+++ b/tests/snapshots/integration__integration_tests__list__json_with_display_fields.snap
@@ -16,7 +16,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp3pOwWk/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpE2ELVC/test-config.toml
---
success: true
exit_code: 0
@@ -41,6 +41,10 @@ exit_code: 0
0,
0
],
+ "working_tree_diff_with_main": [
+ 0,
+ 0
+ ],
"branch_diff": [
0,
0
@@ -72,6 +76,10 @@ exit_code: 0
1,
1
],
+ "working_tree_diff_with_main": [
+ 2,
+ 1
+ ],
"branch_diff": [
1,
0
@@ -106,6 +114,10 @@ exit_code: 0
0,
0
],
+ "working_tree_diff_with_main": [
+ 1,
+ 1
+ ],
"branch_diff": [
0,
0
diff --git a/tests/snapshots/integration__integration_tests__list__json_with_metadata.snap b/tests/snapshots/integration__integration_tests__list__json_with_metadata.snap
index 16f0e1294..ddc2022ec 100644
--- a/tests/snapshots/integration__integration_tests__list__json_with_metadata.snap
+++ b/tests/snapshots/integration__integration_tests__list__json_with_metadata.snap
@@ -16,7 +16,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpDlUXIn/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpRq4uUS/test-config.toml
---
success: true
exit_code: 0
@@ -41,6 +41,10 @@ exit_code: 0
0,
0
],
+ "working_tree_diff_with_main": [
+ 0,
+ 0
+ ],
"branch_diff": [
0,
0
@@ -72,6 +76,10 @@ exit_code: 0
0,
0
],
+ "working_tree_diff_with_main": [
+ 0,
+ 0
+ ],
"branch_diff": [
0,
0
@@ -103,6 +111,10 @@ exit_code: 0
0,
0
],
+ "working_tree_diff_with_main": [
+ 0,
+ 0
+ ],
"branch_diff": [
0,
0
diff --git a/tests/snapshots/integration__integration_tests__list__locked_no_reason.snap b/tests/snapshots/integration__integration_tests__list__locked_no_reason.snap
index 4108e2a10..6dd5df9f3 100644
--- a/tests/snapshots/integration__integration_tests__list__locked_no_reason.snap
+++ b/tests/snapshots/integration__integration_tests__list__locked_no_reason.snap
@@ -15,14 +15,14 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpApuzAg/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpYuerRp/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
-Branch Working ± Main ↕ State Path Age Commit Message
-main  ./test-repo  b834638e10 months agoInitial commit
-locked-no-reason (locked) ./locked-no-reason b834638e10 months agoInitial commit
+Branch Working ± Main ↕ State Path Remote ↕ Age Commit Message
+main  ./test-repo  b834638e10 months agoInitial commit
+locked-no-reason (no commits) (matches main) (locked) ./locked-no-reason b834638e10 months agoInitial commit
Showing 2 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__locked_worktree.snap b/tests/snapshots/integration__integration_tests__list__locked_worktree.snap
index ab66252d7..29e9ba169 100644
--- a/tests/snapshots/integration__integration_tests__list__locked_worktree.snap
+++ b/tests/snapshots/integration__integration_tests__list__locked_worktree.snap
@@ -15,14 +15,14 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpR0Iw1w/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpp40ZYn/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
-Branch State Path Age Commit Message
-main  ./test-repo  b834638e10 months agoInitial commit
-locked-feature (locked: Testing lock functionality) ./locked-feature b834638e10 months agoInitial commit
+Branch Working ± State Path Age Commit Message
+main  ./test-repo  b834638e10 months agoInitial commit
+locked-feature (no commits) (matches main) (locked: Testing lock functionality) ./locked-feature b834638e10 months agoInitial commit
Showing 2 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__long_commit_message.snap b/tests/snapshots/integration__integration_tests__list__long_commit_message.snap
index a8c1845af..f02d4c6f6 100644
--- a/tests/snapshots/integration__integration_tests__list__long_commit_message.snap
+++ b/tests/snapshots/integration__integration_tests__list__long_commit_message.snap
@@ -15,14 +15,14 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmptigmG5/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpx2T0uV/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
-Branch Working ± Main ↕ State Path Remote ↕ Age Commit Message
-main  ./test-repo 1310bfb910 months agoShort message
-feature-a ↓1 ./feature-a f078644e10 months agoThis is a very long commit message that should test how the...
+Branch Working ± Main ↕ State Path Remote ↕ Age Commit Message
+main  ./test-repo 1310bfb910 months agoShort message
+feature-a ↓1 (no commits) ./feature-a f078644e10 months agoThis is a very long commit message that should test...
Showing 2 worktrees, 1 behind
diff --git a/tests/snapshots/integration__integration_tests__list__many_worktrees_varied.snap b/tests/snapshots/integration__integration_tests__list__many_worktrees_varied.snap
index 208da35ae..70f306651 100644
--- a/tests/snapshots/integration__integration_tests__list__many_worktrees_varied.snap
+++ b/tests/snapshots/integration__integration_tests__list__many_worktrees_varied.snap
@@ -15,17 +15,17 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp9BAm5P/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpoXpJFG/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
-Branch Working ± Path Age Commit Message
-main  ./test-repo  b834638e10 months agoInitial commit
-medium-name  ./medium-name  b834638e10 months agoInitial commit
-short  ./short  b834638e10 months agoInitial commit
-very-long-branch-name-here ./very-long-branch-name-here b834638e10 months agoInitial commit
-with-changes  ./with-changes  b834638e10 months agoInitial commit
+Branch Working ± Main ↕ State Path Age Commit Message
+main  ./test-repo  b834638e10 months agoInitial commit
+medium-name  (no commits) (matches main) ./medium-name  b834638e10 months agoInitial commit
+short  (no commits) (matches main) ./short  b834638e10 months agoInitial commit
+very-long-branch-name-here (no commits) (matches main) ./very-long-branch-name-here b834638e10 months agoInitial commit
+with-changes  (no commits) (matches main) ./with-changes  b834638e10 months agoInitial commit
Showing 5 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__multiple_worktrees.snap b/tests/snapshots/integration__integration_tests__list__multiple_worktrees.snap
index 28c435ce7..5b5ac9acc 100644
--- a/tests/snapshots/integration__integration_tests__list__multiple_worktrees.snap
+++ b/tests/snapshots/integration__integration_tests__list__multiple_worktrees.snap
@@ -15,15 +15,15 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpjS1yc4/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpu76ikq/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
-Branch Working ± Main ↕ State Path Remote ↕ Age Commit Message
-main  ./test-repo b834638e10 months agoInitial commit
-feature-a ./feature-a b834638e10 months agoInitial commit
-feature-b ./feature-b b834638e10 months agoInitial commit
+Branch Working ± Main ↕ State Path Age Commit Message
+main  ./test-repo b834638e10 months agoInitial commit
+feature-a (no commits) (matches main) ./feature-a b834638e10 months agoInitial commit
+feature-b (no commits) (matches main) ./feature-b b834638e10 months agoInitial commit
Showing 3 worktrees
diff --git a/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap b/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap
index 23b511a5b..f70ece8aa 100644
--- a/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap
+++ b/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap
@@ -15,14 +15,14 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp1Nz4dL/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpdtZBUv/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
-Branch Working ± Main ↕ State Path Remote ↕ Age Commit Message
-main  ./test-repo  e4614cb710 months agoFix bug with café ☕ handling
-feature-test ↓1 ./feature-test 0c53695b10 months agoAdd support for 日本語 and émoji 🎉
+Branch Working ± Main ↕ State Path Remote ↕ Age Commit Message
+main  ./test-repo  e4614cb710 months agoFix bug with café ☕ handling
+feature-test ↓1 (no commits) ./feature-test 0c53695b10 months agoAdd support for 日本語 and...
Showing 2 worktrees, 1 behind
diff --git a/tests/snapshots/integration__integration_tests__list__with_branches_flag.snap b/tests/snapshots/integration__integration_tests__list__with_branches_flag.snap
index 20fd0521f..1cd056ff4 100644
--- a/tests/snapshots/integration__integration_tests__list__with_branches_flag.snap
+++ b/tests/snapshots/integration__integration_tests__list__with_branches_flag.snap
@@ -16,17 +16,17 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpzgVkgS/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpZOMfa4/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
-Branch Working ± Main ↕ Path Age Commit Message
-main  ./test-repo  b834638e10 months agoInitial commit
-feature-with-worktree  ./feature-with-worktree b834638e10 months agoInitial commit
-another-branch  b834638e10 months agoInitial commit
-feature-without-worktree b834638e10 months agoInitial commit
-fix-bug  b834638e10 months agoInitial commit
+Branch Working ± Main ↕ State Path Remote ↕ Age Commit Message
+main  ./test-repo  b834638e10 months agoInitial commit
+feature-with-worktree  (no commits) (matches main) ./feature-with-worktree b834638e10 months agoInitial commit
+another-branch  b834638e10 months agoInitial commit
+feature-without-worktree b834638e10 months agoInitial commit
+fix-bug  b834638e10 months agoInitial commit
Showing 2 worktrees, 3 branches
diff --git a/tests/snapshots/integration__integration_tests__list__with_branches_flag_none_available.snap b/tests/snapshots/integration__integration_tests__list__with_branches_flag_none_available.snap
index 82ca1788b..08053f887 100644
--- a/tests/snapshots/integration__integration_tests__list__with_branches_flag_none_available.snap
+++ b/tests/snapshots/integration__integration_tests__list__with_branches_flag_none_available.snap
@@ -16,15 +16,15 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpcHsVyH/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpgmNBuY/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
-Branch Working ± Main ↕ State Path Remote ↕ Age Commit Message
-main  ./test-repo b834638e10 months agoInitial commit
-feature-a ./feature-a b834638e10 months agoInitial commit
-feature-b ./feature-b b834638e10 months agoInitial commit
+Branch Working ± Main ↕ State Path Age Commit Message
+main  ./test-repo b834638e10 months agoInitial commit
+feature-a (no commits) (matches main) ./feature-a b834638e10 months agoInitial commit
+feature-b (no commits) (matches main) ./feature-b b834638e10 months agoInitial commit
Showing 3 worktrees
diff --git a/tests/snapshots/integration__integration_tests__security__commit_message_with_directive_not_executed.snap b/tests/snapshots/integration__integration_tests__security__commit_message_with_directive_not_executed.snap
index b402d691a..d2bda0160 100644
--- a/tests/snapshots/integration__integration_tests__security__commit_message_with_directive_not_executed.snap
+++ b/tests/snapshots/integration__integration_tests__security__commit_message_with_directive_not_executed.snap
@@ -15,14 +15,14 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmppG2u4O/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpnFkFXJ/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
-Branch Working ± Main ↕ State Path Remote ↕ Age Commit Message
-main  ./test-repo [SHA]10 months agoFix bug __WORKTRUNK_EXEC__echo PWNED > /tmp/hacked4
-feature ./feature  [SHA]10 months agoFix bug __WORKTRUNK_EXEC__echo PWNED > /tmp/hacked4
+Branch Working ± Main ↕ State Path Age Commit Message
+main  ./test-repo [SHA]10 months agoFix bug __WORKTRUNK_EXEC__echo PWNED > /tmp/hacked4
+feature (no commits) (matches main) ./feature  [SHA]10 months agoFix bug __WORKTRUNK_EXEC__echo PWNED > /tmp/hacked4
Showing 2 worktrees
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_empty_diffs.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_empty_diffs.snap
index 943ccf6b1..621c3baf8 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_empty_diffs.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_empty_diffs.snap
@@ -15,16 +15,16 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpk8aLRc/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpsfUMYX/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
-Branch Working ± Main ↕ State Path Remote ↕ Age Commit Message
-main  ./test-repo  b834638e10 months agoInitial commit
-also-no-changes ./also-no-changes b834638e10 months agoInitial commit
-no-changes  ./no-changes  b834638e10 months agoInitial commit
-with-changes +1 -1 ./with-changes b834638e10 months agoInitial commit
+Branch Working ± Main ↕ State Path Remote ↕ Age Commit Message
+main  ./test-repo  b834638e10 months agoInitial commit
+also-no-changes (no commits) (matches main) ./also-no-changes b834638e10 months agoInitial commit
+no-changes  (no commits) (matches main) ./no-changes  b834638e10 months agoInitial commit
+with-changes +1 -1 ./with-changes b834638e10 months agoInitial commit
Showing 4 worktrees, 1 with changes
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_extreme_diffs.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_extreme_diffs.snap
index 22bc84a4d..8b809a56f 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_extreme_diffs.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_extreme_diffs.snap
@@ -15,15 +15,15 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpNAvx23/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmphuoJvj/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
-Branch Working ± Main ↕ State Path Remote ↕ Age Commit Message
-main  ./test-repo b834638e10 months agoInitial commit
-huge  ./huge  b834638e10 months agoInitial commit
-tiny +1 -1 ./tiny b834638e10 months agoInitial commit
+Branch Working ± Main ↕ State Path Remote ↕ Age Commit Message
+main  ./test-repo b834638e10 months agoInitial commit
+huge  (no commits) (matches main) ./huge  b834638e10 months agoInitial commit
+tiny +1 -1 ./tiny b834638e10 months agoInitial commit
Showing 3 worktrees, 1 with changes
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_varying_diffs.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_varying_diffs.snap
index a7e4f015a..a0994f2ea 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_varying_diffs.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_varying_diffs.snap
@@ -15,16 +15,16 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpSMxiie/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp6dujLj/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
-Branch Working ± Main ↕ State Path Remote ↕ Age Commit Message
-main  ./test-repo  b834638e10 months agoInitial commit
-feature-large  ./feature-large  b834638e10 months agoInitial commit
-feature-medium ./feature-medium b834638e10 months agoInitial commit
-feature-small  ./feature-small  b834638e10 months agoInitial commit
+Branch Working ± Main ↕ State Path Remote ↕ Age Commit Message
+main  ./test-repo  b834638e10 months agoInitial commit
+feature-large  (no commits) (matches main) ./feature-large  b834638e10 months agoInitial commit
+feature-medium (no commits) (matches main) ./feature-medium b834638e10 months agoInitial commit
+feature-small  (no commits) (matches main) ./feature-small  b834638e10 months agoInitial commit
Showing 4 worktrees
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__long_branch_names.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__long_branch_names.snap
index 696890332..f3b5cc0d9 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__long_branch_names.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__long_branch_names.snap
@@ -15,16 +15,16 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpjjArUz/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmppuUEjJ/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
-Branch Path Age Commit Message
-main  ./test-repo  b834638e10 months agoInitial commit
-another-extremely-long-name-here ./another-extremely-long-name-here b834638e10 months agoInitial commit
-short  ./short  b834638e10 months agoInitial commit
-very-long-feature-branch-name  ./very-long-feature-branch-name  b834638e10 months agoInitial commit
+Branch Working ± State Path Age Commit Message
+main  ./test-repo  b834638e10 months agoInitial commit
+another-extremely-long-name-here (no commits) (matches main) ./another-extremely-long-name-here b834638e10 months agoInitial commit
+short  (no commits) (matches main) ./short  b834638e10 months agoInitial commit
+very-long-feature-branch-name  (no commits) (matches main) ./very-long-feature-branch-name  b834638e10 months agoInitial commit
Showing 4 worktrees
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__mixed_length_branch_names.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__mixed_length_branch_names.snap
index 1244d96c5..9117a8dfe 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__mixed_length_branch_names.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__mixed_length_branch_names.snap
@@ -15,16 +15,16 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpfuFYGd/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpR6yG9m/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
-Branch Path Age Commit Message
-main  ./test-repo  b834638e10 months agoInitial commit
-long  ./extremely-long-branch-name-that-might-cause-layout-issues b834638e10 months agoInitial commit
-medium ./medium-length-name  b834638e10 months agoInitial commit
-x  ./x  b834638e10 months agoInitial commit
+Branch Working ± State Path Age Commit Message
+main  ./test-repo  b834638e10 months agoInitial commit
+long  (no commits) (matches main) ./extremely-long-branch-name-that-might-cause-layout-issues b834638e10 months agoInitial commit
+medium (no commits) (matches main) ./medium-length-name  b834638e10 months agoInitial commit
+x  (no commits) (matches main) ./x  b834638e10 months agoInitial commit
Showing 4 worktrees
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__short_branch_names.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__short_branch_names.snap
index 1424d0040..582274d9b 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__short_branch_names.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__short_branch_names.snap
@@ -15,16 +15,16 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpozwkps/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpDzk2IN/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
-Branch Working ± Main ↕ State Path Remote ↕ Age Commit Message
-main  ./test-repo b834638e10 months agoInitial commit
-a  ./a  b834638e10 months agoInitial commit
-bb  ./bb  b834638e10 months agoInitial commit
-ccc  ./ccc  b834638e10 months agoInitial commit
+Branch Working ± Main ↕ State Path Age Commit Message
+main  ./test-repo b834638e10 months agoInitial commit
+a  (no commits) (matches main) ./a  b834638e10 months agoInitial commit
+bb  (no commits) (matches main) ./bb  b834638e10 months agoInitial commit
+ccc  (no commits) (matches main) ./ccc  b834638e10 months agoInitial commit
Showing 4 worktrees
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_120.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_120.snap
index eeed8a831..9f35526cc 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_120.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_120.snap
@@ -15,15 +15,15 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp2WPHfF/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpWMYpj3/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
-Branch Working ± Main ↕ Path Age Commit Message
-main  ./test-repo a7bc47ca10 months agoInitial commit with a reasonably long message
-feature-a ./feature-a a7bc47ca10 months agoInitial commit with a reasonably long message
-feature-b ./feature-b a7bc47ca10 months agoInitial commit with a reasonably long message
+Branch State Path Age Commit Message
+main  ./test-repo a7bc47ca10 months agoInitial commit with a reasonably long...
+feature-a (no commits) (matches main) ./feature-a a7bc47ca10 months agoInitial commit with a reasonably long...
+feature-b (no commits) (matches main) ./feature-b a7bc47ca10 months agoInitial commit with a reasonably long...
Showing 3 worktrees
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_150.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_150.snap
index afd7c1c0f..7edf85164 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_150.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_150.snap
@@ -15,15 +15,15 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmptRuaCq/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmprWISpU/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
-Branch Working ± Main ↕ State Path Remote ↕ Age Commit Message
-main  ./test-repo a7bc47ca10 months agoInitial commit with a reasonably long message
-feature-a ./feature-a a7bc47ca10 months agoInitial commit with a reasonably long message
-feature-b ./feature-b a7bc47ca10 months agoInitial commit with a reasonably long message
+Branch Working ± Main ↕ State Path Age Commit Message
+main  ./test-repo a7bc47ca10 months agoInitial commit with a reasonably long message
+feature-a (no commits) (matches main) ./feature-a a7bc47ca10 months agoInitial commit with a reasonably long message
+feature-b (no commits) (matches main) ./feature-b a7bc47ca10 months agoInitial commit with a reasonably long message
Showing 3 worktrees
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_80.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_80.snap
index 867120909..3de88a89e 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_80.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__terminal_width_80.snap
@@ -15,15 +15,15 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmprTBGz4/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp1Q4LV3/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
-Branch Path Age Commit Message
-main  ./test-repo a7bc47ca10 months agoInitial commit with a...
-feature-a ./feature-a a7bc47ca10 months agoInitial commit with a...
-feature-b ./feature-b a7bc47ca10 months agoInitial commit with a...
+Branch State Path Age Commit
+main  ./test-repo a7bc47ca10 months ago
+feature-a (no commits) (matches main) ./feature-a a7bc47ca10 months ago
+feature-b (no commits) (matches main) ./feature-b a7bc47ca10 months ago
Showing 3 worktrees
diff --git a/tests/snapshots/integration__integration_tests__spacing_edge_cases__unicode_branch_names.snap b/tests/snapshots/integration__integration_tests__spacing_edge_cases__unicode_branch_names.snap
index a069e2bcf..4878177b2 100644
--- a/tests/snapshots/integration__integration_tests__spacing_edge_cases__unicode_branch_names.snap
+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__unicode_branch_names.snap
@@ -15,16 +15,16 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpJ4KUF7/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpqxNeC2/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
-Branch Working ± Main ↕ State Path Remote ↕ Age Commit Message
-main  ./test-repo b834638e10 months agoInitial commit
-cafe  ./café  b834638e10 months agoInitial commit
-naive  ./naïve  b834638e10 months agoInitial commit
-resume ./résumé  b834638e10 months agoInitial commit
+Branch Working ± Main ↕ State Path Age Commit Message
+main  ./test-repo b834638e10 months agoInitial commit
+cafe  (no commits) (matches main) ./café  b834638e10 months agoInitial commit
+naive  (no commits) (matches main) ./naïve  b834638e10 months agoInitial commit
+resume (no commits) (matches main) ./résumé  b834638e10 months agoInitial commit
Showing 4 worktrees