Skip to content

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

Remove "behind" from summary line in list command

Maximilian Roos13a8d739d59f
diff --git a/src/commands/list/mod.rs b/src/commands/list/mod.rs
index cb978897a..898cd1149 100644
--- a/src/commands/list/mod.rs
+++ b/src/commands/list/mod.rs
@@ -167,10 +167,6 @@ fn display_summary(items: &[ListItem], include_branches: bool, layout: &layout::
parts.push(format!("{} ahead", metrics.ahead_items));
}
- if metrics.behind_items > 0 {
- parts.push(format!("{} behind", metrics.behind_items));
- }
-
if layout.hidden_nonempty_count > 0 {
let plural = if layout.hidden_nonempty_count == 1 {
"column"
@@ -193,7 +189,6 @@ struct SummaryMetrics {
branches: usize,
dirty_worktrees: usize,
ahead_items: usize,
- behind_items: usize,
}
impl SummaryMetrics {
@@ -212,8 +207,5 @@ impl SummaryMetrics {
if counts.ahead > 0 {
self.ahead_items += 1;
}
- if counts.behind > 0 {
- self.behind_items += 1;
- }
}
}
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__bare_repository__bare_repo_list_worktrees.snap b/tests/integration_tests/snapshots/integration__integration_tests__bare_repository__bare_repo_list_worktrees.snap
index db16d2ad9..30bec7769 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__bare_repository__bare_repo_list_worktrees.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__bare_repository__bare_repo_list_worktrees.snap
@@ -1,6 +1,5 @@
---
source: tests/integration_tests/bare_repository.rs
-assertion_line: 175
info:
program: wt
args:
@@ -10,11 +9,12 @@ info:
COLUMNS: "150"
GIT_CONFIG_GLOBAL: /dev/null
GIT_CONFIG_SYSTEM: /dev/null
+ GIT_EDITOR: ""
LANG: C
LC_ALL: C
NO_COLOR: ""
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpsBQ6VP/test-config.toml
+ WORKTRUNK_CONFIG: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpdVovT7/test-config.toml
---
success: true
exit_code: 0
@@ -23,6 +23,6 @@ Branch Status HEAD± main↕ Path Remote↕ Commit Age
feature ./test-repo.feature 72413a3b 10 months ago Work on feature
main ∅ ↓ ↓1 ./test-repo.main 6c3da842 10 months ago Initial commit on main
-⚪ Showing 2 worktrees, 1 behind
+⚪ Showing 2 worktrees
----- stderr -----
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 91df95c2d..01c4d7a6a 100644
--- a/tests/snapshots/integration__integration_tests__list__long_commit_message.snap
+++ b/tests/snapshots/integration__integration_tests__list__long_commit_message.snap
@@ -15,7 +15,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpfBW90h/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpTnj240/test-config.toml
---
success: true
exit_code: 0
@@ -24,6 +24,6 @@ exit_code: 0
main ./test-repo 1310bfb9 10 months ago Short message
feature-a ∅ ↓ ↓1 ./feature-a f078644e 10 months ago This is a very long commit message that should test how the...
-⚪ Showing 2 worktrees, 1 behind
+⚪ Showing 2 worktrees
----- stderr -----
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 8e66550b8..36e65dafe 100644
--- a/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap
+++ b/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap
@@ -15,7 +15,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpeBoewF/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp40cmmH/test-config.toml
---
success: true
exit_code: 0
@@ -24,6 +24,6 @@ exit_code: 0
main ./test-repo e4614cb7 10 months ago Fix bug with café ☕ handling
feature-test ∅ ↓ ↓1 ./feature-test 0c53695b 10 months ago Add support for 日本語 and émoji 🎉
-⚪ Showing 2 worktrees, 1 behind
+⚪ Showing 2 worktrees
----- stderr -----