Skip to content

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

Replace task control flags with skip set for flexible task composition

Maximilian Roosdaf34f63b430
diff --git a/src/commands/list/collect.rs b/src/commands/list/collect.rs
index 462c53fad..64eb18f0a 100644
--- a/src/commands/list/collect.rs
+++ b/src/commands/list/collect.rs
@@ -48,13 +48,10 @@ struct StatusContext {
/// The `EnumDiscriminants` derive generates a companion `TaskKind` enum
/// with the same variants but no payloads, used for type-safe tracking
/// of expected vs received results.
-/// Discriminant enum for `TaskResult`, used for type-safe tracking of
-/// expected vs received results. Generated by `strum::EnumDiscriminants`.
-pub(super) use TaskResultDiscriminants as TaskKind;
-
#[derive(Debug, Clone, strum::EnumDiscriminants)]
#[strum_discriminants(
- name(TaskResultDiscriminants),
+ name(TaskKind),
+ vis(pub),
derive(Hash, strum::IntoStaticStr),
strum(serialize_all = "snake_case")
)]
@@ -438,9 +435,7 @@ pub fn collect(
repo: &Repository,
show_branches: bool,
show_remotes: bool,
- show_full: bool,
- fetch_ci: bool,
- check_merge_tree_conflicts: bool,
+ skip_tasks: &std::collections::HashSet<TaskKind>,
show_progress: bool,
render_table: bool,
config: &worktrunk::config::WorktrunkConfig,
@@ -575,15 +570,14 @@ pub fn collect(
);
// Calculate layout from items (worktrees, local branches, and remote branches)
- let layout = super::layout::calculate_layout_from_basics(&all_items, show_full, fetch_ci);
+ let layout = super::layout::calculate_layout_from_basics(&all_items, skip_tasks);
// Single-line invariant: use safe width to prevent line wrapping
let max_width = super::layout::get_safe_list_width();
- // Create collection options
+ // Create collection options from skip set
let options = super::collect_progressive_impl::CollectOptions {
- fetch_ci,
- check_merge_tree_conflicts,
+ skip_tasks: skip_tasks.clone(), // Clone for thread spawns
};
// Track expected results per item - populated as spawns are queued
@@ -676,6 +670,7 @@ pub fn collect(
let tx_worktrees = tx.clone();
let default_branch_clone = default_branch.clone();
let expected_results_wt = expected_results.clone();
+ let options_wt = options.clone();
std::thread::spawn(move || {
sorted_worktrees_clone
.par_iter()
@@ -687,7 +682,7 @@ pub fn collect(
wt,
idx,
&default_branch_clone,
- &options,
+ &options_wt,
tx_worktrees.clone(),
&expected_results_wt,
);
@@ -719,6 +714,7 @@ pub fn collect(
let tx_branches = tx.clone();
let default_branch_clone = default_branch.clone();
let expected_results_br = expected_results.clone();
+ let options_br = options.clone();
std::thread::spawn(move || {
all_branches
.par_iter()
@@ -729,7 +725,7 @@ pub fn collect(
&main_path,
*item_idx,
&default_branch_clone,
- &options,
+ &options_br,
tx_branches.clone(),
&expected_results_br,
);
diff --git a/src/commands/list/collect_progressive_impl.rs b/src/commands/list/collect_progressive_impl.rs
index 89345de80..032ff0754 100644
--- a/src/commands/list/collect_progressive_impl.rs
+++ b/src/commands/list/collect_progressive_impl.rs
@@ -36,16 +36,22 @@ use super::model::{AheadBehind, BranchDiffTotals, CommitDetails, UpstreamStatus}
// ============================================================================
/// Options for controlling what data to collect.
-#[derive(Clone, Copy)]
+///
+/// Uses a skip set to control which tasks are spawned. Tasks not in the set
+/// will be computed; tasks in the set will be skipped.
+#[derive(Clone, Default)]
pub struct CollectOptions {
- pub fetch_ci: bool,
- pub check_merge_tree_conflicts: bool,
+ /// Tasks to skip (not compute). Empty set means compute everything.
+ ///
+ /// This controls both:
+ /// - Task spawning (in `collect_worktree_progressive`/`collect_branch_progressive`)
+ /// - Column visibility (layout filters columns via `ColumnSpec::requires_task`)
+ pub skip_tasks: std::collections::HashSet<super::collect::TaskKind>,
}
/// Context for task computation. Cloned and moved into spawned threads.
///
-/// Contains all data needed by any task, including options that control
-/// conditional behavior.
+/// Contains all data needed by any task.
#[derive(Clone)]
pub struct TaskContext {
pub repo_path: PathBuf,
@@ -53,9 +59,6 @@ pub struct TaskContext {
pub branch: Option<String>,
pub default_branch: Option<String>,
pub item_idx: usize,
- // Options that affect task behavior
- pub fetch_ci: bool,
- pub check_merge_tree_conflicts: bool,
pub verbose_errors: bool,
}
@@ -290,15 +293,13 @@ impl Task for MergeTreeConflictsTask {
const KIND: TaskKind = TaskKind::MergeTreeConflicts;
fn compute(ctx: TaskContext) -> TaskResult {
- let has_merge_tree_conflicts =
- if ctx.check_merge_tree_conflicts && ctx.default_branch.is_some() {
- let base = ctx.default_branch.as_deref().unwrap();
- let repo = Repository::at(&ctx.repo_path);
- repo.has_merge_conflicts(base, &ctx.commit_sha)
- .unwrap_or(false)
- } else {
- false
- };
+ let has_merge_tree_conflicts = if let Some(base) = ctx.default_branch.as_deref() {
+ let repo = Repository::at(&ctx.repo_path);
+ repo.has_merge_conflicts(base, &ctx.commit_sha)
+ .unwrap_or(false)
+ } else {
+ false
+ };
TaskResult::MergeTreeConflicts {
item_idx: ctx.item_idx,
@@ -399,13 +400,6 @@ impl Task for CiStatusTask {
const KIND: TaskKind = TaskKind::CiStatus;
fn compute(ctx: TaskContext) -> TaskResult {
- if !ctx.fetch_ci {
- return TaskResult::CiStatus {
- item_idx: ctx.item_idx,
- pr_status: None,
- };
- }
-
let repo_path = Repository::at(&ctx.repo_path)
.worktree_root()
.ok()
@@ -429,8 +423,8 @@ impl Task for CiStatusTask {
/// Collect worktree data progressively, sending results as each task completes.
///
-/// Spawns 10 parallel git operations. Each task sends a TaskResult when it
-/// completes, enabling progressive UI updates.
+/// Spawns parallel git operations (up to 10). Each task sends a TaskResult when it
+/// completes, enabling progressive UI updates. Tasks in `options.skip_tasks` are not spawned.
pub fn collect_worktree_progressive(
wt: &Worktree,
item_idx: usize,
@@ -439,38 +433,47 @@ pub fn collect_worktree_progressive(
tx: Sender<TaskResult>,
expected_results: &Arc<ExpectedResults>,
) {
+ use super::collect::TaskKind;
+
let ctx = TaskContext {
repo_path: wt.path.clone(),
commit_sha: wt.head.clone(),
branch: wt.branch.clone(),
default_branch: Some(default_branch.to_string()),
item_idx,
- fetch_ci: options.fetch_ci,
- check_merge_tree_conflicts: options.check_merge_tree_conflicts,
verbose_errors: true, // Worktrees show verbose errors
};
let spawner = TaskSpawner::new(tx, expected_results.clone());
+ let skip = &options.skip_tasks;
std::thread::scope(|s| {
- // All 10 worktree tasks
+ // Core tasks (always run)
spawner.spawn::<CommitDetailsTask>(s, &ctx);
spawner.spawn::<AheadBehindTask>(s, &ctx);
spawner.spawn::<CommittedTreesMatchTask>(s, &ctx);
- spawner.spawn::<BranchDiffTask>(s, &ctx);
spawner.spawn::<WorkingTreeDiffTask>(s, &ctx);
- spawner.spawn::<MergeTreeConflictsTask>(s, &ctx);
spawner.spawn::<GitOperationTask>(s, &ctx);
spawner.spawn::<UserMarkerTask>(s, &ctx);
spawner.spawn::<UpstreamTask>(s, &ctx);
- spawner.spawn::<CiStatusTask>(s, &ctx);
+
+ // Optional tasks (check skip set)
+ if !skip.contains(&TaskKind::BranchDiff) {
+ spawner.spawn::<BranchDiffTask>(s, &ctx);
+ }
+ if !skip.contains(&TaskKind::MergeTreeConflicts) {
+ spawner.spawn::<MergeTreeConflictsTask>(s, &ctx);
+ }
+ if !skip.contains(&TaskKind::CiStatus) {
+ spawner.spawn::<CiStatusTask>(s, &ctx);
+ }
});
}
/// Collect branch data progressively, sending results as each task completes.
///
-/// Spawns 7 parallel git operations (similar to worktrees but without working
-/// tree operations).
+/// Spawns parallel git operations (up to 7, similar to worktrees but without working
+/// tree operations). Tasks in `options.skip_tasks` are not spawned.
#[allow(clippy::too_many_arguments)]
pub fn collect_branch_progressive(
branch_name: &str,
@@ -482,28 +485,37 @@ pub fn collect_branch_progressive(
tx: Sender<TaskResult>,
expected_results: &Arc<ExpectedResults>,
) {
+ use super::collect::TaskKind;
+
let ctx = TaskContext {
repo_path: repo_path.to_path_buf(),
commit_sha: commit_sha.to_string(),
branch: Some(branch_name.to_string()),
default_branch: Some(default_branch.to_string()),
item_idx,
- fetch_ci: options.fetch_ci,
- check_merge_tree_conflicts: options.check_merge_tree_conflicts,
verbose_errors: false, // Branches don't show verbose errors
};
let spawner = TaskSpawner::new(tx, expected_results.clone());
+ let skip = &options.skip_tasks;
std::thread::scope(|s| {
- // 7 branch tasks (no working tree operations)
+ // Core tasks (always run)
spawner.spawn::<CommitDetailsTask>(s, &ctx);
spawner.spawn::<AheadBehindTask>(s, &ctx);
spawner.spawn::<CommittedTreesMatchTask>(s, &ctx);
- spawner.spawn::<BranchDiffTask>(s, &ctx);
spawner.spawn::<UpstreamTask>(s, &ctx);
- spawner.spawn::<MergeTreeConflictsTask>(s, &ctx);
- spawner.spawn::<CiStatusTask>(s, &ctx);
+
+ // Optional tasks (check skip set)
+ if !skip.contains(&TaskKind::BranchDiff) {
+ spawner.spawn::<BranchDiffTask>(s, &ctx);
+ }
+ if !skip.contains(&TaskKind::MergeTreeConflicts) {
+ spawner.spawn::<MergeTreeConflictsTask>(s, &ctx);
+ }
+ if !skip.contains(&TaskKind::CiStatus) {
+ spawner.spawn::<CiStatusTask>(s, &ctx);
+ }
});
}
diff --git a/src/commands/list/columns.rs b/src/commands/list/columns.rs
index bfcb7527a..f2dd4c066 100644
--- a/src/commands/list/columns.rs
+++ b/src/commands/list/columns.rs
@@ -1,3 +1,5 @@
+use super::collect::TaskKind;
+
/// Logical identifier for each column rendered by `wt list`.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum ColumnKind {
@@ -31,8 +33,8 @@ pub struct ColumnSpec {
pub kind: ColumnKind,
pub header: &'static str,
pub base_priority: u8,
- pub requires_show_full: bool,
- pub requires_fetch_ci: bool,
+ /// Task required for this column's data. If Some and task is skipped, column is hidden.
+ pub requires_task: Option<TaskKind>,
pub display_index: u8,
}
@@ -41,16 +43,14 @@ impl ColumnSpec {
kind: ColumnKind,
header: &'static str,
base_priority: u8,
- requires_show_full: bool,
- requires_fetch_ci: bool,
+ requires_task: Option<TaskKind>,
display_index: u8,
) -> Self {
Self {
kind,
header,
base_priority,
- requires_show_full,
- requires_fetch_ci,
+ requires_task,
display_index,
}
}
@@ -58,100 +58,52 @@ impl ColumnSpec {
/// Static registry of all possible columns in display order.
pub const COLUMN_SPECS: &[ColumnSpec] = &[
- ColumnSpec::new(
- ColumnKind::Gutter,
- super::layout::HEADER_GUTTER,
- 0,
- false,
- false,
- 0,
- ),
- ColumnSpec::new(
- ColumnKind::Branch,
- super::layout::HEADER_BRANCH,
- 1,
- false,
- false,
- 1,
- ),
- ColumnSpec::new(
- ColumnKind::Status,
- super::layout::HEADER_STATUS,
- 2,
- false,
- false,
- 2,
- ),
+ ColumnSpec::new(ColumnKind::Gutter, super::layout::HEADER_GUTTER, 0, None, 0),
+ ColumnSpec::new(ColumnKind::Branch, super::layout::HEADER_BRANCH, 1, None, 1),
+ ColumnSpec::new(ColumnKind::Status, super::layout::HEADER_STATUS, 2, None, 2),
ColumnSpec::new(
ColumnKind::WorkingDiff,
super::layout::HEADER_WORKING_DIFF,
3,
- false,
- false,
+ None,
3,
),
ColumnSpec::new(
ColumnKind::AheadBehind,
super::layout::HEADER_AHEAD_BEHIND,
4,
- false,
- false,
+ None,
4,
),
ColumnSpec::new(
ColumnKind::BranchDiff,
super::layout::HEADER_BRANCH_DIFF,
5,
- true,
- false,
+ Some(TaskKind::BranchDiff),
5,
),
- ColumnSpec::new(
- ColumnKind::Path,
- super::layout::HEADER_PATH,
- 6,
- false,
- false,
- 6,
- ),
+ ColumnSpec::new(ColumnKind::Path, super::layout::HEADER_PATH, 6, None, 6),
ColumnSpec::new(
ColumnKind::Upstream,
super::layout::HEADER_UPSTREAM,
7,
- false,
- false,
+ None,
7,
),
ColumnSpec::new(
ColumnKind::CiStatus,
super::layout::HEADER_CI,
8,
- false,
- true,
+ Some(TaskKind::CiStatus),
8,
),
- ColumnSpec::new(
- ColumnKind::Commit,
- super::layout::HEADER_COMMIT,
- 9,
- false,
- false,
- 9,
- ),
- ColumnSpec::new(
- ColumnKind::Time,
- super::layout::HEADER_AGE,
- 10,
- false,
- false,
- 10,
- ),
+ ColumnSpec::new(ColumnKind::Commit, super::layout::HEADER_COMMIT, 9, None, 9),
+ ColumnSpec::new(ColumnKind::Time, super::layout::HEADER_AGE, 10, None, 10),
ColumnSpec::new(
ColumnKind::Message,
super::layout::HEADER_MESSAGE,
11,
- false,
- false,
+ None,
11,
),
];
diff --git a/src/commands/list/layout.rs b/src/commands/list/layout.rs
index 0cfb6aff2..e8bdcc27e 100644
--- a/src/commands/list/layout.rs
+++ b/src/commands/list/layout.rs
@@ -159,10 +159,12 @@
use crate::display::{find_common_prefix, get_terminal_width};
use anstyle::Style;
+use std::collections::HashSet;
use std::path::{Path, PathBuf};
use unicode_width::UnicodeWidthStr;
use worktrunk::styling::{ADDITION, DELETION};
+use super::collect::TaskKind;
use super::columns::{COLUMN_SPECS, ColumnKind, ColumnSpec, DiffVariant};
/// Width of short commit hash display (first 8 hex characters)
@@ -435,7 +437,7 @@ struct PendingColumn<'a> {
/// Uses generous fixed allocations for expensive-to-compute columns (status, diffs, time, CI)
/// that handle overflow with compact notation (K suffix). This provides consistent layout
/// without requiring a data scan.
-fn build_estimated_widths(max_branch: usize, show_full: bool, fetch_ci: bool) -> LayoutMetadata {
+fn build_estimated_widths(max_branch: usize, skip_tasks: &HashSet<TaskKind>) -> LayoutMetadata {
// Fixed widths for slow columns (require expensive git operations)
// Values exceeding these widths use compact notation (K suffix)
//
@@ -450,13 +452,14 @@ fn build_estimated_widths(max_branch: usize, show_full: bool, fetch_ci: bool) ->
let ci_estimate = fit_header(HEADER_CI, 1); // Single indicator symbol
// Assume columns will have data (better to show and hide than to not show)
+ // Columns whose required task is skipped won't have data
let data_flags = ColumnDataFlags {
status: true,
working_diff: true,
ahead_behind: true,
- branch_diff: show_full,
+ branch_diff: !skip_tasks.contains(&TaskKind::BranchDiff),
upstream: true,
- ci_status: fetch_ci,
+ ci_status: !skip_tasks.contains(&TaskKind::CiStatus),
};
let widths = ColumnWidths {
@@ -503,8 +506,7 @@ fn build_estimated_widths(max_branch: usize, show_full: bool, fetch_ci: bool) ->
/// with pre-allocated width estimates for expensive-to-compute columns.
fn allocate_columns_with_priority(
metadata: &LayoutMetadata,
- show_full: bool,
- fetch_ci: bool,
+ skip_tasks: &HashSet<TaskKind>,
max_path_width: usize,
commit_width: usize,
terminal_width: usize,
@@ -514,10 +516,12 @@ fn allocate_columns_with_priority(
let mut remaining = terminal_width;
// Build candidates with priorities
+ // Filter out columns whose required task is being skipped
let mut candidates: Vec<ColumnCandidate> = COLUMN_SPECS
.iter()
.filter(|spec| {
- (!spec.requires_show_full || show_full) && (!spec.requires_fetch_ci || fetch_ci)
+ spec.requires_task
+ .is_none_or(|task| !skip_tasks.contains(&task))
})
.map(|spec| ColumnCandidate {
spec,
@@ -680,17 +684,15 @@ fn allocate_columns_with_priority(
/// - Message: flexible (20-100 chars)
pub fn calculate_layout_from_basics(
items: &[super::model::ListItem],
- show_full: bool,
- fetch_ci: bool,
+ skip_tasks: &HashSet<TaskKind>,
) -> LayoutConfig {
- calculate_layout_with_width(items, show_full, fetch_ci, get_safe_list_width())
+ calculate_layout_with_width(items, skip_tasks, get_safe_list_width())
}
/// Calculate layout with explicit width (for contexts like skim where available width differs)
pub fn calculate_layout_with_width(
items: &[super::model::ListItem],
- show_full: bool,
- fetch_ci: bool,
+ skip_tasks: &HashSet<TaskKind>,
terminal_width: usize,
) -> LayoutConfig {
// Calculate common prefix from worktree paths
@@ -724,14 +726,13 @@ pub fn calculate_layout_with_width(
let max_path_width = fit_header(HEADER_PATH, path_data_width);
// Build pre-allocated width estimates (same as buffered mode)
- let metadata = build_estimated_widths(max_branch, show_full, fetch_ci);
+ let metadata = build_estimated_widths(max_branch, skip_tasks);
let commit_width = fit_header(HEADER_COMMIT, COMMIT_HASH_WIDTH);
allocate_columns_with_priority(
&metadata,
- show_full,
- fetch_ci,
+ skip_tasks,
max_path_width,
commit_width,
terminal_width,
@@ -749,7 +750,8 @@ mod tests {
#[test]
fn test_pre_allocated_width_estimates() {
// Test that build_estimated_widths() returns correct pre-allocated estimates
- let metadata = build_estimated_widths(20, true, true);
+ // Empty skip set means all tasks are computed (equivalent to --full)
+ let metadata = build_estimated_widths(20, &HashSet::new());
let widths = metadata.widths;
// Line diffs (Signs variant: +/-) allocate 3 digits for 100-999 range
@@ -858,7 +860,10 @@ mod tests {
};
let items = vec![item];
- let layout = calculate_layout_from_basics(&items, false, false);
+ let skip_tasks: HashSet<TaskKind> = [TaskKind::BranchDiff, TaskKind::CiStatus]
+ .into_iter()
+ .collect();
+ let layout = calculate_layout_from_basics(&items, &skip_tasks);
assert!(
!layout.columns.is_empty(),
@@ -945,7 +950,10 @@ mod tests {
};
let items = vec![item];
- let layout = calculate_layout_from_basics(&items, false, false);
+ let skip_tasks: HashSet<TaskKind> = [TaskKind::BranchDiff, TaskKind::CiStatus]
+ .into_iter()
+ .collect();
+ let layout = calculate_layout_from_basics(&items, &skip_tasks);
assert!(
layout
diff --git a/src/commands/list/mod.rs b/src/commands/list/mod.rs
index 80c56716a..aa92d2c2e 100644
--- a/src/commands/list/mod.rs
+++ b/src/commands/list/mod.rs
@@ -146,10 +146,23 @@ pub fn handle_list(
render_mode: RenderMode,
config: &worktrunk::config::WorktrunkConfig,
) -> anyhow::Result<()> {
+ use collect::TaskKind;
+
let repo = Repository::current();
- let fetch_ci = show_full; // Only fetch CI with --full (expensive)
- let check_merge_tree_conflicts = show_full; // Only check conflicts with --full (expensive)
+ // Build skip set based on flags
+ // Without --full: skip expensive operations (BranchDiff, CiStatus, MergeTreeConflicts)
+ let skip_tasks: std::collections::HashSet<TaskKind> = if show_full {
+ std::collections::HashSet::new() // Compute everything
+ } else {
+ [
+ TaskKind::BranchDiff,
+ TaskKind::CiStatus,
+ TaskKind::MergeTreeConflicts,
+ ]
+ .into_iter()
+ .collect()
+ };
// Progressive rendering only for table format with Progressive mode
let show_progress = match format {
@@ -164,9 +177,7 @@ pub fn handle_list(
&repo,
show_branches,
show_remotes,
- show_full,
- fetch_ci,
- check_merge_tree_conflicts,
+ &skip_tasks,
show_progress,
render_table,
config,
diff --git a/src/commands/select.rs b/src/commands/select.rs
index db86ecffc..ab03abf5b 100644
--- a/src/commands/select.rs
+++ b/src/commands/select.rs
@@ -608,12 +608,20 @@ pub fn handle_select(is_directive_mode: bool) -> anyhow::Result<()> {
.unwrap_or_default();
// Gather list data using simplified collection (buffered mode)
+ // Skip expensive operations not needed for select UI
+ let skip_tasks = [
+ collect::TaskKind::BranchDiff,
+ collect::TaskKind::CiStatus,
+ collect::TaskKind::MergeTreeConflicts,
+ ]
+ .into_iter()
+ .collect();
+
let Some(list_data) = collect::collect(
- &repo, true, // show_branches (include branches without worktrees)
+ &repo,
+ true, // show_branches (include branches without worktrees)
false, // show_remotes (local branches only, not remote branches)
- false, // show_full (no full layout needed)
- false, // fetch_ci (no CI with select command)
- false, // check_conflicts (no conflict checking with select command)
+ &skip_tasks,
false, // show_progress (no progress bars)
false, // render_table (select renders its own UI)
&config,
@@ -633,8 +641,7 @@ pub fn handle_select(is_directive_mode: bool) -> anyhow::Result<()> {
};
let layout = super::list::layout::calculate_layout_with_width(
&list_data.items,
- false, // show_full
- false, // fetch_ci
+ &skip_tasks,
skim_list_width,
);
diff --git a/src/commands/statusline.rs b/src/commands/statusline.rs
index 44daeb399..83caee2f5 100644
--- a/src/commands/statusline.rs
+++ b/src/commands/statusline.rs
@@ -14,7 +14,7 @@ use std::path::Path;
use std::time::Duration;
use worktrunk::git::Repository;
-use super::list::{self, CollectOptions};
+use super::list::{self, CollectOptions, collect::TaskKind};
/// Claude Code context parsed from stdin JSON
struct ClaudeCodeContext {
@@ -257,8 +257,8 @@ fn get_git_status(repo: &Repository, cwd: &Path) -> Result<Option<String>> {
&mut items,
&default_branch,
CollectOptions {
- fetch_ci: true,
- check_merge_tree_conflicts: false,
+ // Statusline: fetch CI, skip only merge-tree conflicts
+ skip_tasks: [TaskKind::MergeTreeConflicts].into_iter().collect(),
},
)?;
diff --git a/tests/snapshots/integration__integration_tests__list__json_tree_matches_main_after_merge.snap b/tests/snapshots/integration__integration_tests__list__json_tree_matches_main_after_merge.snap
index 5c13e3f5d..f918000af 100644
--- a/tests/snapshots/integration__integration_tests__list__json_tree_matches_main_after_merge.snap
+++ b/tests/snapshots/integration__integration_tests__list__json_tree_matches_main_after_merge.snap
@@ -29,10 +29,6 @@ exit_code: 0
"commit_message": "Same content on main",
"ahead": 0,
"behind": 0,
- "branch_diff": {
- "added": 0,
- "deleted": 0
- },
"upstream_remote": null,
"upstream_ahead": 0,
"upstream_behind": 0,
@@ -80,10 +76,6 @@ exit_code: 0
"commit_message": "Merge main into feature",
"ahead": 2,
"behind": 0,
- "branch_diff": {
- "added": 0,
- "deleted": 0
- },
"upstream_remote": null,
"upstream_ahead": 0,
"upstream_behind": 0,
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 b37f7d1bf..f20da94fc 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
@@ -29,10 +29,6 @@ exit_code: 0
"commit_message": "Main commit 2",
"ahead": 0,
"behind": 0,
- "branch_diff": {
- "added": 0,
- "deleted": 0
- },
"upstream_remote": null,
"upstream_ahead": 0,
"upstream_behind": 0,
@@ -80,10 +76,6 @@ exit_code: 0
"commit_message": "Feature commit 2",
"ahead": 2,
"behind": 2,
- "branch_diff": {
- "added": 1,
- "deleted": 0
- },
"upstream_remote": null,
"upstream_ahead": 0,
"upstream_behind": 0,
@@ -109,8 +101,7 @@ exit_code: 0
"worktree_state": ""
},
"commits_display": "/u001b[32m↑2/u001b[0m /u001b[2m/u001b[31m↓2/u001b[0m",
- "branch_diff_display": "/u001b[32m+1/u001b[0m",
- "status_line": "feature-ahead /u001b[36m!/u001b[39m/u001b[36m?/u001b[39m/u001b[2m↕/u001b[22m @/u001b[32m+1/u001b[0m /u001b[31m-1/u001b[0m /u001b[32m↑2/u001b[0m /u001b[2m/u001b[31m↓2/u001b[0m ^/u001b[32m+1/u001b[0m",
+ "status_line": "feature-ahead /u001b[36m!/u001b[39m/u001b[36m?/u001b[39m/u001b[2m↕/u001b[22m @/u001b[32m+1/u001b[0m /u001b[31m-1/u001b[0m /u001b[32m↑2/u001b[0m /u001b[2m/u001b[31m↓2/u001b[0m",
"type": "worktree",
"path": "[REPO].feature-ahead",
"bare": false,
@@ -130,10 +121,6 @@ exit_code: 0
"commit_message": "Initial commit on main",
"ahead": 0,
"behind": 2,
- "branch_diff": {
- "added": 0,
- "deleted": 0
- },
"upstream_remote": null,
"upstream_ahead": 0,
"upstream_behind": 0,
diff --git a/tests/snapshots/integration__integration_tests__list__json_with_git_operation.snap b/tests/snapshots/integration__integration_tests__list__json_with_git_operation.snap
index 29262ced8..f6b234c4a 100644
--- a/tests/snapshots/integration__integration_tests__list__json_with_git_operation.snap
+++ b/tests/snapshots/integration__integration_tests__list__json_with_git_operation.snap
@@ -29,10 +29,6 @@ exit_code: 0
"commit_message": "Main conflicting changes",
"ahead": 0,
"behind": 0,
- "branch_diff": {
- "added": 0,
- "deleted": 0
- },
"upstream_remote": null,
"upstream_ahead": 0,
"upstream_behind": 0,
@@ -80,10 +76,6 @@ exit_code: 0
"commit_message": "Main conflicting changes",
"ahead": 0,
"behind": 0,
- "branch_diff": {
- "added": 0,
- "deleted": 0
- },
"upstream_remote": null,
"upstream_ahead": 0,
"upstream_behind": 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 b79814125..c4ad595cf 100644
--- a/tests/snapshots/integration__integration_tests__list__json_with_metadata.snap
+++ b/tests/snapshots/integration__integration_tests__list__json_with_metadata.snap
@@ -29,10 +29,6 @@ exit_code: 0
"commit_message": "Initial commit",
"ahead": 0,
"behind": 0,
- "branch_diff": {
- "added": 0,
- "deleted": 0
- },
"upstream_remote": null,
"upstream_ahead": 0,
"upstream_behind": 0,
@@ -80,10 +76,6 @@ exit_code: 0
"commit_message": "Initial commit",
"ahead": 0,
"behind": 0,
- "branch_diff": {
- "added": 0,
- "deleted": 0
- },
"upstream_remote": null,
"upstream_ahead": 0,
"upstream_behind": 0,
@@ -130,10 +122,6 @@ exit_code: 0
"commit_message": "Initial commit",
"ahead": 0,
"behind": 0,
- "branch_diff": {
- "added": 0,
- "deleted": 0
- },
"upstream_remote": null,
"upstream_ahead": 0,
"upstream_behind": 0,
diff --git a/tests/snapshots/integration__integration_tests__list__json_with_user_marker.snap b/tests/snapshots/integration__integration_tests__list__json_with_user_marker.snap
index 68bfc4bb6..11658d2c2 100644
--- a/tests/snapshots/integration__integration_tests__list__json_with_user_marker.snap
+++ b/tests/snapshots/integration__integration_tests__list__json_with_user_marker.snap
@@ -29,10 +29,6 @@ exit_code: 0
"commit_message": "Initial commit",
"ahead": 0,
"behind": 0,
- "branch_diff": {
- "added": 0,
- "deleted": 0
- },
"upstream_remote": null,
"upstream_ahead": 0,
"upstream_behind": 0,
@@ -80,10 +76,6 @@ exit_code: 0
"commit_message": "Initial commit",
"ahead": 0,
"behind": 0,
- "branch_diff": {
- "added": 0,
- "deleted": 0
- },
"upstream_remote": null,
"upstream_ahead": 0,
"upstream_behind": 0,
@@ -132,10 +124,6 @@ exit_code: 0
"commit_message": "Initial commit",
"ahead": 0,
"behind": 0,
- "branch_diff": {
- "added": 0,
- "deleted": 0
- },
"upstream_remote": null,
"upstream_ahead": 0,
"upstream_behind": 0,