Skip to content

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

Add working tree conflict detection to --full flag (#296)

Maximilian Roosc116e0474493
diff --git a/docs/content/list.md b/docs/content/list.md
index dabe06ee7..e18afa6d9 100644
--- a/docs/content/list.md
+++ b/docs/content/list.md
@@ -122,7 +122,7 @@ The Status column has multiple subcolumns. Within each, only the first matching
| | `⊟` | Prunable (directory missing) |
| | `⊞` | Locked worktree |
| Default branch | `^` | Is the default branch |
-| | `✗` | Would conflict if merged to the default branch |
+| | `✗` | Would conflict if merged to the default branch (with `--full`, includes uncommitted changes) |
| | `_` | Same commit as the default branch, clean |
| | `–` | Same commit as the default branch, uncommitted changes |
| | `⊂` | Content [integrated](@/remove.md#branch-cleanup) into the default branch or target |
@@ -278,7 +278,7 @@ Usage: <b><span class=c>wt list</span></b> <span class=c>[OPTIONS]</span>
Include remote branches
<b><span class=c>--full</span></b>
- Show CI and default-branch merge-base diffstat (<b>main…±</b> column)
+ Show CI, merge-base diffstat, and working tree conflict check
<b><span class=c>--progressive</span></b>
Show fast info immediately, update with slow info
diff --git a/src/cli.rs b/src/cli.rs
index 204d974c7..73864c8f3 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -1966,7 +1966,7 @@ The Status column has multiple subcolumns. Within each, only the first matching
| | `⊟` | Prunable (directory missing) |
| | `⊞` | Locked worktree |
| Default branch | `^` | Is the default branch |
-| | `✗` | Would conflict if merged to the default branch |
+| | `✗` | Would conflict if merged to the default branch (with `--full`, includes uncommitted changes) |
| | `_` | Same commit as the default branch, clean |
| | `–` | Same commit as the default branch, uncommitted changes |
| | `⊂` | Content [integrated](@/remove.md#branch-cleanup) into the default branch or target |
@@ -2120,7 +2120,7 @@ When `main_state == "integrated"`: `"ancestor"` `"trees_match"` `"no_added_chang
#[arg(long)]
remotes: bool,
- /// Show CI and default-branch merge-base diffstat (`main…±` column)
+ /// Show CI, merge-base diffstat, and working tree conflict check
#[arg(long)]
full: bool,
diff --git a/src/commands/list/collect.rs b/src/commands/list/collect.rs
index 199aafc58..29dfdd002 100644
--- a/src/commands/list/collect.rs
+++ b/src/commands/list/collect.rs
@@ -65,6 +65,12 @@ use super::model::WorkingTreeStatus;
#[derive(Clone, Default)]
struct StatusContext {
has_merge_tree_conflicts: bool,
+ /// Working tree conflict check result (--full only, worktrees only).
+ /// None = use commit check (task didn't run or working tree clean)
+ /// Some(b) = dirty working tree, b is conflict result
+ // TODO: If we need to distinguish "task didn't run" from "clean working tree",
+ // expand to an enum. Currently both cases fall back to commit-based check.
+ has_working_tree_conflicts: Option<bool>,
user_marker: Option<String>,
working_tree_status: Option<WorkingTreeStatus>,
has_conflicts: bool,
@@ -73,9 +79,16 @@ struct StatusContext {
impl StatusContext {
fn apply_to(&self, item: &mut ListItem, target: &str) {
// Main worktree case is handled inside check_integration_state()
+ //
+ // Prefer working tree conflicts (--full) when available.
+ // None means task didn't run or working tree was clean - use commit check.
+ let has_conflicts = self
+ .has_working_tree_conflicts
+ .unwrap_or(self.has_merge_tree_conflicts);
+
item.compute_status_symbols(
Some(target),
- self.has_merge_tree_conflicts,
+ has_conflicts,
self.user_marker.clone(),
self.working_tree_status,
self.has_conflicts,
@@ -142,11 +155,23 @@ pub(super) enum TaskResult {
working_tree_status: WorkingTreeStatus,
has_conflicts: bool,
},
- /// Potential merge conflicts with main (merge-tree simulation)
+ /// Potential merge conflicts with main (merge-tree simulation on committed HEAD)
MergeTreeConflicts {
item_idx: usize,
has_merge_tree_conflicts: bool,
},
+ /// Potential merge conflicts including working tree changes (--full only)
+ ///
+ /// For dirty worktrees, uses `git stash create` to get a tree object that
+ /// includes uncommitted changes, then runs merge-tree against that.
+ /// Returns None if working tree is clean (fall back to MergeTreeConflicts).
+ WorkingTreeConflicts {
+ item_idx: usize,
+ /// None = working tree clean (use MergeTreeConflicts result)
+ /// Some(true) = dirty working tree would conflict
+ /// Some(false) = dirty working tree would not conflict
+ has_working_tree_conflicts: Option<bool>,
+ },
/// Git operation in progress (rebase/merge)
GitOperation {
item_idx: usize,
@@ -190,6 +215,7 @@ impl TaskResult {
| TaskResult::BranchDiff { item_idx, .. }
| TaskResult::WorkingTreeDiff { item_idx, .. }
| TaskResult::MergeTreeConflicts { item_idx, .. }
+ | TaskResult::WorkingTreeConflicts { item_idx, .. }
| TaskResult::GitOperation { item_idx, .. }
| TaskResult::UserMarker { item_idx, .. }
| TaskResult::Upstream { item_idx, .. }
@@ -336,6 +362,10 @@ fn apply_default(items: &mut [ListItem], status_contexts: &mut [StatusContext],
// Don't show conflict symbol if we couldn't check
status_contexts[idx].has_merge_tree_conflicts = false;
}
+ TaskKind::WorkingTreeConflicts => {
+ // Fall back to commit-based check on failure
+ status_contexts[idx].has_working_tree_conflicts = None;
+ }
TaskKind::GitOperation => {
// Already defaults to GitOperationState::None in WorktreeData
}
@@ -521,6 +551,13 @@ fn drain_results(
// Store for status_symbols computation
status_ctx.has_merge_tree_conflicts = has_merge_tree_conflicts;
}
+ TaskResult::WorkingTreeConflicts {
+ has_working_tree_conflicts,
+ ..
+ } => {
+ // Store for status_symbols computation (takes precedence over commit check)
+ status_ctx.has_working_tree_conflicts = has_working_tree_conflicts;
+ }
TaskResult::GitOperation { git_operation, .. } => {
if let ItemKind::Worktree(data) = &mut item.kind {
data.git_operation = git_operation;
diff --git a/src/commands/list/collect_progressive_impl.rs b/src/commands/list/collect_progressive_impl.rs
index 21aac8abb..1948a53d0 100644
--- a/src/commands/list/collect_progressive_impl.rs
+++ b/src/commands/list/collect_progressive_impl.rs
@@ -168,10 +168,15 @@ impl TaskSpawner {
&self,
scope: &'scope std::thread::Scope<'scope, '_>,
ctx: &TaskContext,
+ skip: &std::collections::HashSet<TaskKind>,
) {
self.spawn::<WorkingTreeDiffTask>(scope, ctx);
self.spawn::<GitOperationTask>(scope, ctx);
self.spawn::<UserMarkerTask>(scope, ctx);
+ // Working tree conflict check only with --full
+ if !skip.contains(&TaskKind::WorkingTreeConflicts) {
+ self.spawn::<WorkingTreeConflictsTask>(scope, ctx);
+ }
}
fn spawn_optional_tasks<'scope>(
@@ -445,6 +450,76 @@ impl Task for MergeTreeConflictsTask {
}
}
+/// Task 6b (worktree only, --full only): Working tree conflict check
+///
+/// For dirty worktrees, uses `git stash create` to get a tree object that
+/// includes uncommitted changes, then runs merge-tree against that.
+/// Returns None if working tree is clean (caller should fall back to MergeTreeConflicts).
+pub struct WorkingTreeConflictsTask;
+
+impl Task for WorkingTreeConflictsTask {
+ const KIND: TaskKind = TaskKind::WorkingTreeConflicts;
+
+ fn compute(ctx: TaskContext) -> Result<TaskResult, TaskError> {
+ let base = ctx.require_default_branch(Self::KIND)?;
+ let repo = ctx.repo();
+
+ // Quick check if working tree is dirty via git status
+ let status_output = repo
+ .run_command(&["status", "--porcelain"])
+ .map_err(|e| ctx.error(Self::KIND, e))?;
+
+ let is_dirty = !status_output.trim().is_empty();
+
+ if !is_dirty {
+ // Clean working tree - return None to signal "use commit-based check"
+ return Ok(TaskResult::WorkingTreeConflicts {
+ item_idx: ctx.item_idx,
+ has_working_tree_conflicts: None,
+ });
+ }
+
+ // Dirty working tree - create a temporary tree object via stash create
+ // `git stash create` returns a commit SHA without modifying refs
+ //
+ // Note: stash create fails when there are unmerged files (merge conflict in progress).
+ // In that case, fall back to the commit-based check.
+ let stash_result = repo.run_command(&["stash", "create"]);
+
+ let stash_sha = match stash_result {
+ Ok(sha) => sha,
+ Err(_) => {
+ // Stash create failed (likely unmerged files during rebase/merge)
+ // Fall back to commit-based check
+ return Ok(TaskResult::WorkingTreeConflicts {
+ item_idx: ctx.item_idx,
+ has_working_tree_conflicts: None,
+ });
+ }
+ };
+
+ let stash_sha = stash_sha.trim();
+
+ // If stash create returns empty, working tree is clean (shouldn't happen but handle it)
+ if stash_sha.is_empty() {
+ return Ok(TaskResult::WorkingTreeConflicts {
+ item_idx: ctx.item_idx,
+ has_working_tree_conflicts: None,
+ });
+ }
+
+ // Run merge-tree with the stash commit
+ let has_conflicts = repo
+ .has_merge_conflicts(base, stash_sha)
+ .map_err(|e| ctx.error(Self::KIND, e))?;
+
+ Ok(TaskResult::WorkingTreeConflicts {
+ item_idx: ctx.item_idx,
+ has_working_tree_conflicts: Some(has_conflicts),
+ })
+ }
+}
+
/// Task 7 (worktree only): Git operation state detection (rebase/merge)
pub struct GitOperationTask;
@@ -620,7 +695,7 @@ fn collect_progressive(
// Core tasks (always run)
spawner.spawn_core_tasks(s, &ctx);
if include_worktree_tasks {
- spawner.spawn_worktree_only_tasks(s, &ctx);
+ spawner.spawn_worktree_only_tasks(s, &ctx, skip);
}
spawner.spawn_optional_tasks(s, &ctx, skip);
});
diff --git a/src/commands/list/mod.rs b/src/commands/list/mod.rs
index 6a9791985..669e8b270 100644
--- a/src/commands/list/mod.rs
+++ b/src/commands/list/mod.rs
@@ -152,16 +152,20 @@ pub fn handle_list(
let repo = Repository::current();
// Build skip set based on flags
- // Without --full: skip expensive operations (BranchDiff, CiStatus)
+ // Without --full: skip expensive operations (BranchDiff, CiStatus, WorkingTreeConflicts)
// TODO: WouldMergeAdd (~500ms-2s per worktree) is currently enabled for ⊂ detection.
// If this causes performance issues, consider adding it back to skip_tasks or
// implementing a timeout for the merge simulation.
let skip_tasks: std::collections::HashSet<TaskKind> = if show_full {
std::collections::HashSet::new() // Compute everything
} else {
- [TaskKind::BranchDiff, TaskKind::CiStatus]
- .into_iter()
- .collect()
+ [
+ TaskKind::BranchDiff,
+ TaskKind::CiStatus,
+ TaskKind::WorkingTreeConflicts,
+ ]
+ .into_iter()
+ .collect()
};
// Progressive rendering only for table format with Progressive mode
diff --git a/tests/integration_tests/list.rs b/tests/integration_tests/list.rs
index 5c7fa04d9..c39a3e805 100644
--- a/tests/integration_tests/list.rs
+++ b/tests/integration_tests/list.rs
@@ -56,6 +56,12 @@ fn snapshot_list_with_branches_and_remotes(test_name: &str, repo: &TestRepo) {
);
}
+fn snapshot_list_full(test_name: &str, repo: &TestRepo) {
+ let mut cmd = list_snapshots::command(repo, repo.root_path());
+ cmd.arg("--full");
+ run_snapshot(setup_snapshot_settings(repo), test_name, cmd);
+}
+
fn snapshot_list_progressive(test_name: &str, repo: &TestRepo) {
run_snapshot(
setup_snapshot_settings(repo),
@@ -2495,6 +2501,79 @@ fn test_list_maximum_status_symbols(mut repo: TestRepo) {
});
}
+/// Test that --full detects working tree conflicts (uncommitted changes that would conflict).
+///
+/// This specifically tests the WorkingTreeConflicts task which:
+/// 1. Uses `git stash create` to get a tree object from uncommitted changes
+/// 2. Runs merge-tree against the default branch to detect conflicts
+///
+/// The key distinction from commit-level conflicts:
+/// - Commit-level: HEAD conflicts with main (always checked)
+/// - Working tree: Uncommitted changes conflict with main (only with --full)
+#[rstest]
+fn test_list_full_working_tree_conflicts(mut repo: TestRepo) {
+ // Create initial commit with a shared file
+ std::fs::write(repo.root_path().join("shared.txt"), "original content").unwrap();
+ repo.commit("Initial commit");
+
+ // Create feature worktree - at this point feature and main are identical
+ let feature = repo.add_worktree("feature");
+
+ // Advance main with a change to the shared file
+ std::fs::write(repo.root_path().join("shared.txt"), "main's version").unwrap();
+ repo.commit("Main changes shared.txt");
+
+ // Feature's HEAD is still at the original commit - no commit-level conflict
+ // because feature hasn't committed anything that conflicts
+
+ // Now add uncommitted changes to feature that would conflict with main
+ std::fs::write(feature.join("shared.txt"), "feature's uncommitted version").unwrap();
+
+ // Without --full: no conflict symbol (only checks commit-level)
+ snapshot_list("working_tree_conflicts_without_full", &repo);
+
+ // With --full: should show conflict symbol because uncommitted changes conflict
+ snapshot_list_full("working_tree_conflicts_with_full", &repo);
+}
+
+/// Test that clean working trees don't affect conflict detection with --full.
+///
+/// Even with --full, if the working tree is clean, we skip the stash-based check
+/// and just use the commit-level conflict detection.
+#[rstest]
+fn test_list_full_clean_working_tree_uses_commit_conflicts(mut repo: TestRepo) {
+ // Create initial commit with a shared file
+ std::fs::write(repo.root_path().join("shared.txt"), "original content").unwrap();
+ repo.commit("Initial commit");
+
+ // Create feature worktree
+ let feature = repo.add_worktree("feature");
+
+ // Make a conflicting commit on feature (different change to shared.txt)
+ std::fs::write(feature.join("shared.txt"), "feature's committed version").unwrap();
+ let mut cmd = Command::new("git");
+ repo.configure_git_cmd(&mut cmd);
+ cmd.args(["add", "."])
+ .current_dir(&feature)
+ .output()
+ .unwrap();
+ let mut cmd = Command::new("git");
+ repo.configure_git_cmd(&mut cmd);
+ cmd.args(["commit", "-m", "Feature changes shared.txt"])
+ .current_dir(&feature)
+ .output()
+ .unwrap();
+
+ // Advance main with a different change to the shared file
+ std::fs::write(repo.root_path().join("shared.txt"), "main's version").unwrap();
+ repo.commit("Main changes shared.txt");
+
+ // Feature has a committed conflict, working tree is clean
+ // Both with and without --full should show the conflict symbol
+ snapshot_list("commit_conflicts_without_full", &repo);
+ snapshot_list_full("commit_conflicts_with_full", &repo);
+}
+
#[rstest]
fn test_list_warns_when_default_branch_missing_worktree(repo: TestRepo) {
// Move primary worktree off the default branch so no worktree holds it
diff --git a/tests/snapshots/integration__integration_tests__help__help_list_long.snap b/tests/snapshots/integration__integration_tests__help__help_list_long.snap
index 53af7cca4..53eb61f00 100644
--- a/tests/snapshots/integration__integration_tests__help__help_list_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_list_long.snap
@@ -39,7 +39,7 @@ Usage: wt list [OPTIONS]
Include remote branches
--full
- Show CI and default-branch merge-base diffstat (main…± column)
+ Show CI, merge-base diffstat, and working tree conflict check
--progressive
Show fast info immediately, update with slow info
@@ -124,30 +124,30 @@ seconds; use wt config state to view or clear.
The Status column has multiple subcolumns. Within each, only the first matching symbol is shown (listed in priority order):
- Subcolumn Symbol Meaning
- ──────────────── ────── ──────────────────────────────────────────────────────
- Working tree (1) + Staged files
- Working tree (2) ! Modified files (unstaged)
- Working tree (3) ? Untracked files
- Worktree ✘ Merge conflicts
- ⤴ Rebase in progress
- ⤵ Merge in progress
- / Branch without worktree
- ⚑ Worktree path doesn't match branch name
- ⊟ Prunable (directory missing)
- ⊞ Locked worktree
- Default branch ^ Is the default branch
- ✗ Would conflict if merged to the default branch
- _ Same commit as the default branch, clean
- – Same commit as the default branch, uncommitted changes
- ⊂ Content integrated into the default branch or target
- ↕ Diverged from the default branch
- ↑ Ahead of the default branch
- ↓ Behind the default branch
- Remote \| In sync with remote
- ⇅ Diverged from remote
- ⇡ Ahead of remote
- ⇣ Behind remote
+ Subcolumn Symbol Meaning
+ ──────────────── ────── ──────────────────────────────────────────────────────────────────────────────────────────
+ Working tree (1) + Staged files
+ Working tree (2) ! Modified files (unstaged)
+ Working tree (3) ? Untracked files
+ Worktree ✘ Merge conflicts
+ ⤴ Rebase in progress
+ ⤵ Merge in progress
+ / Branch without worktree
+ ⚑ Worktree path doesn't match branch name
+ ⊟ Prunable (directory missing)
+ ⊞ Locked worktree
+ Default branch ^ Is the default branch
+ ✗ Would conflict if merged to the default branch (with --full, includes uncommitted changes)
+ _ Same commit as the default branch, clean
+ – Same commit as the default branch, uncommitted changes
+ ⊂ Content integrated into the default branch or target
+ ↕ Diverged from the default branch
+ ↑ Ahead of the default branch
+ ↓ Behind the default branch
+ Remote \| In sync with remote
+ ⇅ Diverged from remote
+ ⇡ Ahead of remote
+ ⇣ Behind remote
Rows are dimmed when safe to delete (_ same commit with clean working tree or ⊂ content integrated).
diff --git a/tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snap b/tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snap
index 739d30d45..b0534c9fe 100644
--- a/tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snap
@@ -39,7 +39,7 @@ Usage: wt list [OPTIONS]
Include remote branches
--full
- Show CI and default-branch merge-base diffstat (main…± column)
+ Show CI, merge-base diffstat, and working tree conflict check
--progressive
Show fast info immediately, update with slow info
@@ -131,23 +131,23 @@ to view or clear.
The Status column has multiple subcolumns. Within each, only the first matching
symbol is shown (listed in priority order):
- Subcolumn Symbol Meaning
- ──────────────── ────── ────────────────────────────────────────────────────
- Working tree (1) + Staged files
- Working tree (2) ! Modified files (unstaged)
- Working tree (3) ? Untracked files
- Worktree ✘ Merge conflicts
- ⤴ Rebase in progress
- ⤵ Merge in progress
- / Branch without worktree
- ⚑ Worktree path doesn't match branch name
- ⊟ Prunable (directory missing)
- ⊞ Locked worktree
- Default branch ^ Is the default branch
- ✗ Would conflict if merged to the default branch
- _ Same commit as the default branch, clean
- – Same commit as the default branch, uncommitted
- changes
+ Subcolumn Symbol Meaning
+ ──────────────── ────── ───────────────────────────────────────
+ Working tree (1) + Staged files
+ Working tree (2) ! Modified files (unstaged)
+ Working tree (3) ? Untracked files
+ Worktree ✘ Merge conflicts
+ ⤴ Rebase in progress
+ ⤵ Merge in progress
+ / Branch without worktree
+ ⚑ Worktree path doesn't match branch name
+ ⊟ Prunable (directory missing)
+ ⊞ Locked worktree
+ Default branch ^ Is the default branch
+| | ✗ | Would conflict if merged to the default branch (with --full,
+includes uncommitted changes) |
+ _ Same commit as the default branch, clean
+ – Same commit as the default branch, uncommitted changes
| | ⊂ | Content integrated into the default
branch or target |
↕ Diverged from the default branch
diff --git a/tests/snapshots/integration__integration_tests__help__help_list_short.snap b/tests/snapshots/integration__integration_tests__help__help_list_short.snap
index 0b5309d17..c77afca3e 100644
--- a/tests/snapshots/integration__integration_tests__help__help_list_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_list_short.snap
@@ -8,7 +8,7 @@ info:
env:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
- GIT_CONFIG_GLOBAL: ""
+ GIT_EDITOR: ""
RUST_LOG: warn
SOURCE_DATE_EPOCH: "1735776000"
WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml
@@ -30,7 +30,7 @@ Usage: wt list [OPTIONS]
--format <FORMAT> Output format (table, json) [default: table]
--branches Include branches without worktrees
--remotes Include remote branches
- --full Show CI and default-branch merge-base diffstat (main…± column)
+ --full Show CI, merge-base diffstat, and working tree conflict check
--progressive Show fast info immediately, update with slow info
-h, --help Print help (see more with '--help')
diff --git a/tests/snapshots/integration__integration_tests__list__commit_conflicts_with_full.snap b/tests/snapshots/integration__integration_tests__list__commit_conflicts_with_full.snap
new file mode 100644
index 000000000..3a885ecf1
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__list__commit_conflicts_with_full.snap
@@ -0,0 +1,37 @@
+---
+source: tests/integration_tests/list.rs
+info:
+ program: wt
+ args:
+ - list
+ - "--full"
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "150"
+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
+ GIT_CONFIG_SYSTEM: /dev/null
+ GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ PATH: "[PATH]"
+ RUST_LOG: warn
+ SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+ Branch Status HEAD± main↕ main…± Path Remote⇅ CI Commit Age Message
+@ main ^ . f31b5717 1d Main changes shared.txt
++ feature ✗ ↑1 ↓1 +1 -1 ../repo.feature 70300b03 1d Feature changes shared.txt
+
+○ Showing 2 worktrees, 1 ahead
+
+----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__list__commit_conflicts_without_full.snap b/tests/snapshots/integration__integration_tests__list__commit_conflicts_without_full.snap
new file mode 100644
index 000000000..65fd3f18f
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__list__commit_conflicts_without_full.snap
@@ -0,0 +1,36 @@
+---
+source: tests/integration_tests/list.rs
+info:
+ program: wt
+ args:
+ - list
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "150"
+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
+ GIT_CONFIG_SYSTEM: /dev/null
+ GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ PATH: "[PATH]"
+ RUST_LOG: warn
+ SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ . f31b5717 1d Main changes shared.txt
++ feature ✗ ↑1 ↓1 ../repo.feature 70300b03 1d Feature changes shared.txt
+
+○ Showing 2 worktrees, 1 ahead
+
+----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__list__working_tree_conflicts_with_full.snap b/tests/snapshots/integration__integration_tests__list__working_tree_conflicts_with_full.snap
new file mode 100644
index 000000000..b3cbe81e5
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__list__working_tree_conflicts_with_full.snap
@@ -0,0 +1,37 @@
+---
+source: tests/integration_tests/list.rs
+info:
+ program: wt
+ args:
+ - list
+ - "--full"
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "150"
+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
+ GIT_CONFIG_SYSTEM: /dev/null
+ GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ PATH: "[PATH]"
+ RUST_LOG: warn
+ SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+ Branch Status HEAD± main↕ main…± Path Remote⇅ CI Commit Age Message
+@ main ^ . f31b5717 1d Main changes shared.txt
++ feature ! ✗ +1 -1 ↓1 ../repo.feature 523c1c09 1d Initial commit
+
+○ Showing 2 worktrees, 1 with changes
+
+----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__list__working_tree_conflicts_without_full.snap b/tests/snapshots/integration__integration_tests__list__working_tree_conflicts_without_full.snap
new file mode 100644
index 000000000..89b6c01a9
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__list__working_tree_conflicts_without_full.snap
@@ -0,0 +1,36 @@
+---
+source: tests/integration_tests/list.rs
+info:
+ program: wt
+ args:
+ - list
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "150"
+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
+ GIT_CONFIG_SYSTEM: /dev/null
+ GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ PATH: "[PATH]"
+ RUST_LOG: warn
+ SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+ Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
+@ main ^ . f31b5717 1d Main changes shared.txt
++ feature ! ↓ +1 -1 ↓1 ../repo.feature 523c1c09 1d Initial commit
+
+○ Showing 2 worktrees, 1 with changes
+
+----- stderr -----