Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
feat(step-copy-ignored): add TTY progress spinner (#2413)
Maximilian Roosda349b30d819
diff --git a/.claude/skills/writing-user-outputs/SKILL.md b/.claude/skills/writing-user-outputs/SKILL.mdindex bcb0cc563..840f8d5e0 100644--- a/.claude/skills/writing-user-outputs/SKILL.md+++ b/.claude/skills/writing-user-outputs/SKILL.md@@ -596,6 +596,16 @@ Removed worktree for bugfixSigns of poor temporal locality: collecting messages in a buffer, single successmessage for batch operations, no progress before slow operations.+## Spinners for Long Single-Operation Work++When per-item `progress_message`s don't fit — recursive copy of thousands of+files, a long subprocess with no useful streaming output — a stderr spinner+keeps the user oriented. See `src/copy_progress.rs` (`CopyProgress`) for the+pattern: TTY-gate, skip when `verbosity() >= 1` or `--dry-run`, ≥300 ms+startup delay so fast ops stay silent, IEC bytes (KiB/MiB), clear the line+before printing the summary, and have the summary repeat any counters the+spinner displayed.+## Defer Non-Essential Work Until After Primary OutputFire-and-forget cleanup and cache sweeps run after the command's finaldiff --git a/benches/cow_copy.rs b/benches/cow_copy.rsindex f40c456bf..a010f54eb 100644--- a/benches/cow_copy.rs+++ b/benches/cow_copy.rs@@ -16,6 +16,7 @@ use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main};use std::path::Path;use tempfile::TempDir;use worktrunk::copy::copy_dir_recursive;+use worktrunk::copy_progress::CopyProgress;/// Create a narrow directory structure mimicking a Rust target/ directory.///@@ -147,7 +148,7 @@ fn bench_helper(b.iter(|| {let dest = temp.path().join(format!("copy_p_{}", iter));iter += 1;- copy_dir_recursive(src, &dest, false).unwrap();+ copy_dir_recursive(src, &dest, false, &CopyProgress::disabled()).unwrap();std::fs::remove_dir_all(&dest).ok();});},diff --git a/src/commands/step_commands.rs b/src/commands/step_commands.rsindex 0e139f1e4..78b05b236 100644--- a/src/commands/step_commands.rs+++ b/src/commands/step_commands.rs@@ -26,6 +26,7 @@ use rayon::prelude::*;use worktrunk::HookType;use worktrunk::config::{CopyIgnoredConfig, UserConfig};use worktrunk::copy::{copy_dir_recursive, copy_leaf};+use worktrunk::copy_progress::{CopyProgress, format_bytes};use worktrunk::git::{Repository, WorktreeInfo};use worktrunk::path::format_path_for_display;use worktrunk::shell_exec::Cmd;@@ -805,7 +806,15 @@ pub fn step_copy_ignored(}}+ // `start` auto-detects the TTY; verbose/dry-run already print enough.+ let progress = if verbose >= 1 || dry_run {+ CopyProgress::disabled()+ } else {+ CopyProgress::start()+ };+let mut copied_count = 0usize;+ let mut copied_bytes = 0u64;for (src_entry, is_dir) in &entries_to_copy {let relative = src_entry.strip_prefix(&source_path)@@ -813,10 +822,12 @@ pub fn step_copy_ignored(let dest_entry = dest_path.join(relative);if *is_dir {- copied_count +=- copy_dir_recursive(src_entry, &dest_entry, force).with_context(|| {+ let (n, b) = copy_dir_recursive(src_entry, &dest_entry, force, &progress)+ .with_context(|| {format!("copying directory {}", format_path_for_display(relative))})?;+ copied_count += n;+ copied_bytes += b;} else {if let Some(parent) = dest_entry.parent() {fs::create_dir_all(parent).with_context(|| {@@ -826,17 +837,23 @@ pub fn step_copy_ignored()})?;}- if copy_leaf(src_entry, &dest_entry, force)? {+ if let Some(bytes) = copy_leaf(src_entry, &dest_entry, force)? {copied_count += 1;+ copied_bytes += bytes;+ progress.file_copied(bytes);}}}+ progress.finish();// Show summarylet file_word = if copied_count == 1 { "file" } else { "files" };eprintln!("{}",- success_message(format!("Copied {copied_count} {file_word}"))+ success_message(format!(+ "Copied {copied_count} {file_word} · {}",+ format_bytes(copied_bytes)+ )));Ok(())@@ -904,7 +921,7 @@ fn move_entry(src: &Path, dest: &Path, is_dir: bool) -> anyhow::Result<()> {/// Copy then delete — fallback when `rename` fails with EXDEV (cross-device).fn copy_and_remove(src: &Path, dest: &Path, is_dir: bool) -> anyhow::Result<()> {if is_dir {- copy_dir_recursive(src, dest, true)?;+ copy_dir_recursive(src, dest, true, &CopyProgress::disabled())?;fs::remove_dir_all(src).context(format!("removing source directory {}", src.display()))?;} else {copy_leaf(src, dest, true)?;diff --git a/src/copy.rs b/src/copy.rsindex f481bc14f..9ac33b7a8 100644--- a/src/copy.rs+++ b/src/copy.rs@@ -11,16 +11,22 @@//!//! Callers that want low-priority I/O (e.g. `step_copy_ignored`) should call//! [`crate::priority::lower_current_process`] before starting work.+//!+//! Callers that want a TTY progress spinner pass a [`CopyProgress`] — every+//! successful leaf copy calls `progress.file_copied(bytes)`. Non-interactive+//! callers pass [`CopyProgress::disabled`] for a zero-overhead no-op.use std::fs;use std::io::ErrorKind;use std::path::{Path, PathBuf};use std::sync::LazyLock;-use std::sync::atomic::{AtomicUsize, Ordering};+use std::sync::atomic::{AtomicU64, AtomicUsize, Ordering};use anyhow::Context;use rayon::prelude::*;+use crate::copy_progress::CopyProgress;+/// Capped at 4 threads to avoid saturating the CPU — the global rayon pool is/// much larger (2× CPU cores, tuned for network I/O in `wt list`).static COPY_POOL: LazyLock<rayon::ThreadPool> = LazyLock::new(|| {@@ -32,24 +38,25 @@ static COPY_POOL: LazyLock<rayon::ThreadPool> = LazyLock::new(|| {/// Copy a single file or symlink, using reflink (COW) when possible.///-/// Detects symlinks via `symlink_metadata` on the source. Returns `true` if-/// the entry was copied, `false` if skipped (destination already exists).-/// When `force` is true, existing entries are removed before copying.-pub fn copy_leaf(src: &Path, dest: &Path, force: bool) -> anyhow::Result<bool> {+/// Detects symlinks via `symlink_metadata` on the source. Returns `Some(bytes)`+/// when the entry was copied (reporting the source's logical byte size), or+/// `None` if skipped because the destination already exists. When `force` is+/// true, existing entries are removed before copying.+pub fn copy_leaf(src: &Path, dest: &Path, force: bool) -> anyhow::Result<Option<u64>> {if force {remove_if_exists(dest)?;}// Use symlink_metadata (not exists()) because exists() follows symlinks// and returns false for broken ones.if dest.symlink_metadata().is_ok() {- return Ok(false);+ return Ok(None);}- let is_symlink = src+ let src_meta = src.symlink_metadata()- .with_context(|| format!("reading metadata for {}", src.display()))?- .file_type()- .is_symlink();+ .with_context(|| format!("reading metadata for {}", src.display()))?;+ let is_symlink = src_meta.file_type().is_symlink();+ let bytes = src_meta.len();if is_symlink {let target =@@ -68,20 +75,17 @@ pub fn copy_leaf(src: &Path, dest: &Path, force: bool) -> anyhow::Result<bool> {// Refs: ioctl_ficlonerange(2), LWN Articles/331808#[cfg(unix)]{- let perms = fs::metadata(src)- .context("reading source file permissions")?- .permissions();- fs::set_permissions(dest, perms)+ fs::set_permissions(dest, src_meta.permissions()).context("setting destination file permissions")?;}}- Err(e) if e.kind() == ErrorKind::AlreadyExists => return Ok(false),+ Err(e) if e.kind() == ErrorKind::AlreadyExists => return Ok(None),Err(e) => {return Err(anyhow::Error::from(e).context(format!("copying {}", src.display())));}}}- Ok(true)+ Ok(Some(bytes))}/// A leaf item (file or symlink) collected during the directory walk.@@ -98,10 +102,16 @@ struct CopyLeaf {/// are skipped for idempotent usage.////// When `force` is true, existing files and symlinks at the destination are-/// removed before copying.+/// removed before copying. `progress` receives per-file callbacks; pass+/// [`CopyProgress::disabled`] for a zero-overhead no-op.///-/// Returns the number of files actually copied (excludes skipped entries).-pub fn copy_dir_recursive(src: &Path, dest: &Path, force: bool) -> anyhow::Result<usize> {+/// Returns `(files_copied, bytes_copied)` — counts exclude skipped entries.+pub fn copy_dir_recursive(+ src: &Path,+ dest: &Path,+ force: bool,+ progress: &CopyProgress,+) -> anyhow::Result<(usize, u64)> {// Phase 1: Walk directories iteratively, creating dest dirs and collecting leaves.let mut leaves = Vec::new();let mut dir_stack = vec![(src.to_path_buf(), dest.to_path_buf())];@@ -134,13 +144,16 @@ pub fn copy_dir_recursive(src: &Path, dest: &Path, force: bool) -> anyhow::Resul}// Phase 2: Copy all leaves in parallel.- let copied = AtomicUsize::new(0);+ let copied_files = AtomicUsize::new(0);+ let copied_bytes = AtomicU64::new(0);COPY_POOL.install(|| {leaves.par_iter().try_for_each(|leaf| -> anyhow::Result<()> {- if copy_leaf(&leaf.src, &leaf.dest, force)? {- copied.fetch_add(1, Ordering::Relaxed);+ if let Some(bytes) = copy_leaf(&leaf.src, &leaf.dest, force)? {+ copied_files.fetch_add(1, Ordering::Relaxed);+ copied_bytes.fetch_add(bytes, Ordering::Relaxed);+ progress.file_copied(bytes);}Ok(())})@@ -158,7 +171,7 @@ pub fn copy_dir_recursive(src: &Path, dest: &Path, force: bool) -> anyhow::Resul.with_context(|| format!("setting permissions on {}", dest_dir.display()))?;}- Ok(copied.into_inner())+ Ok((copied_files.into_inner(), copied_bytes.into_inner()))}/// Remove a file, ignoring "not found" errors.diff --git a/src/copy_progress.rs b/src/copy_progress.rsnew file mode 100644index 000000000..54c8ba2df--- /dev/null+++ b/src/copy_progress.rs@@ -0,0 +1,294 @@+//! TTY spinner for long-running copy operations.+//!+//! Shows a single-line stderr spinner (`⠋ Copying 1,234 files · 312 MiB`) that+//! updates in place while files are copied. Copy workers bump atomic counters+//! via [`CopyProgress::file_copied`]; a background thread renders at ~10Hz+//! using crossterm cursor control.+//!+//! `start` is named deliberately (not `new`) because it spawns a ticker thread+//! as a side effect — `Default`-style semantics would be misleading.+//!+//! The progress line is cleared on [`CopyProgress::finish`] or on drop, so the+//! caller can print a summary message immediately afterward without overlap.++use std::io::{IsTerminal, Write};+use std::sync::Arc;+use std::sync::atomic::{AtomicBool, AtomicU64, AtomicUsize, Ordering};+use std::thread::{self, JoinHandle};+use std::time::{Duration, Instant};++use color_print::cformat;+use crossterm::{+ QueueableCommand,+ cursor::MoveToColumn,+ terminal::{Clear, ClearType},+};++const SPINNER_FRAMES: &[char] = &['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];+const TICK_INTERVAL: Duration = Duration::from_millis(100);+/// Delay before the first frame renders, so sub-second copies stay silent.+const STARTUP_DELAY: Duration = Duration::from_millis(300);++struct Shared {+ files: AtomicUsize,+ bytes: AtomicU64,+ done: AtomicBool,+}++struct Inner {+ shared: Arc<Shared>,+ ticker: JoinHandle<()>,+}++/// Live spinner displaying files-copied and bytes-copied counters.+///+/// See [module docs](crate::copy_progress) for the output format and lifecycle.+pub struct CopyProgress(Option<Inner>);++impl CopyProgress {+ /// Start a progress reporter, enabling the spinner iff stderr is a TTY.+ ///+ /// Spawns a background ticker thread when a TTY is detected. When stderr+ /// is not a TTY, returns a disabled reporter and does no work.+ pub fn start() -> Self {+ if !std::io::stderr().is_terminal() {+ return Self::disabled();+ }+ let shared = Arc::new(Shared {+ files: AtomicUsize::new(0),+ bytes: AtomicU64::new(0),+ done: AtomicBool::new(false),+ });+ let ticker = {+ let shared = Arc::clone(&shared);+ thread::spawn(move || ticker_loop(&shared))+ };+ Self(Some(Inner { shared, ticker }))+ }++ /// A reporter that does nothing — for benchmarks, tests, and internal moves.+ pub fn disabled() -> Self {+ Self(None)+ }++ /// Record that a file (or symlink) was copied. Safe to call from any thread.+ pub fn file_copied(&self, bytes: u64) {+ if let Some(inner) = &self.0 {+ inner.shared.files.fetch_add(1, Ordering::Relaxed);+ inner.shared.bytes.fetch_add(bytes, Ordering::Relaxed);+ }+ }++ /// Stop the spinner and clear the progress line.+ pub fn finish(self) {+ // Drop runs the same shutdown logic — no need to duplicate it here.+ drop(self);+ }+}++impl Drop for CopyProgress {+ fn drop(&mut self) {+ // `Inner` is Drop-free, so we can take ownership of its fields and+ // run shutdown without partial-move conflicts.+ if let Some(inner) = self.0.take() {+ inner.shared.done.store(true, Ordering::Relaxed);+ inner.ticker.thread().unpark();+ let _ = inner.ticker.join();+ let _ = clear_line(&mut std::io::stderr().lock());+ }+ }+}++fn ticker_loop(shared: &Shared) {+ let start = Instant::now();+ // Sub-300ms copies render nothing — the line never gets drawn. park_timeout+ // returns immediately on `unpark` from drop, so short copies don't block+ // shutdown either.+ while start.elapsed() < STARTUP_DELAY {+ if shared.done.load(Ordering::Relaxed) {+ return;+ }+ thread::park_timeout(STARTUP_DELAY - start.elapsed());+ }+ while !shared.done.load(Ordering::Relaxed) {+ let frame_idx = (start.elapsed().as_millis() / TICK_INTERVAL.as_millis()) as usize+ % SPINNER_FRAMES.len();+ let files = shared.files.load(Ordering::Relaxed);+ let bytes = shared.bytes.load(Ordering::Relaxed);+ let line = format_line(files, bytes, SPINNER_FRAMES[frame_idx]);+ let _ = render_line(&mut std::io::stderr().lock(), &line);+ thread::park_timeout(TICK_INTERVAL);+ }+}++fn format_line(files: usize, bytes: u64, spinner: char) -> String {+ if files == 0 {+ cformat!("<cyan>{spinner}</> Copying...")+ } else {+ let word = if files == 1 { "file" } else { "files" };+ cformat!(+ "<cyan>{spinner}</> Copying {} {} · {}",+ format_count(files),+ word,+ format_bytes(bytes),+ )+ }+}++fn render_line<W: Write>(w: &mut W, line: &str) -> std::io::Result<()> {+ w.queue(MoveToColumn(0))?;+ w.queue(Clear(ClearType::CurrentLine))?;+ write!(w, "{line}")?;+ w.flush()+}++fn clear_line<W: Write>(w: &mut W) -> std::io::Result<()> {+ w.queue(MoveToColumn(0))?;+ w.queue(Clear(ClearType::CurrentLine))?;+ w.flush()+}++fn format_count(n: usize) -> String {+ let s = n.to_string();+ let bytes = s.as_bytes();+ let mut out = String::with_capacity(s.len() + s.len() / 3);+ for (i, b) in bytes.iter().enumerate() {+ if i > 0 && (bytes.len() - i).is_multiple_of(3) {+ out.push(',');+ }+ out.push(*b as char);+ }+ out+}++/// Format a byte count using IEC binary prefixes (KiB, MiB, GiB, TiB).+///+/// The divisor is 1024; SI-prefix "MB" would imply 10^6 and doesn't match what+/// we compute. Used by both the spinner line and the post-copy summary.+pub fn format_bytes(n: u64) -> String {+ const UNITS: &[&str] = &["B", "KiB", "MiB", "GiB", "TiB"];+ let mut size = n as f64;+ let mut unit = 0;+ while size >= 1024.0 && unit < UNITS.len() - 1 {+ size /= 1024.0;+ unit += 1;+ }+ if unit == 0 {+ format!("{n} {}", UNITS[unit])+ } else {+ format!("{size:.1} {}", UNITS[unit])+ }+}++#[cfg(test)]+mod tests {+ use super::*;++ /// Construct an enabled instance directly, bypassing the TTY check that+ /// would otherwise force a disabled reporter under cargo test. Lives in+ /// the test module per the CLAUDE.md rule against test-only library APIs.+ fn enabled_for_test() -> CopyProgress {+ let shared = Arc::new(Shared {+ files: AtomicUsize::new(0),+ bytes: AtomicU64::new(0),+ done: AtomicBool::new(false),+ });+ let ticker = {+ let shared = Arc::clone(&shared);+ thread::spawn(move || ticker_loop(&shared))+ };+ CopyProgress(Some(Inner { shared, ticker }))+ }++ #[test]+ fn test_format_count() {+ assert_eq!(format_count(0), "0");+ assert_eq!(format_count(42), "42");+ assert_eq!(format_count(999), "999");+ assert_eq!(format_count(1_000), "1,000");+ assert_eq!(format_count(12_345), "12,345");+ assert_eq!(format_count(1_234_567), "1,234,567");+ }++ #[test]+ fn test_format_bytes() {+ assert_eq!(format_bytes(0), "0 B");+ assert_eq!(format_bytes(512), "512 B");+ assert_eq!(format_bytes(1024), "1.0 KiB");+ assert_eq!(format_bytes(1_536), "1.5 KiB");+ assert_eq!(format_bytes(1_048_576), "1.0 MiB");+ assert_eq!(format_bytes(1_610_612_736), "1.5 GiB");+ }++ #[test]+ fn test_format_line_empty() {+ let line = format_line(0, 0, '⠋');+ assert!(line.contains("Copying..."));+ assert!(line.contains('⠋'));+ }++ #[test]+ fn test_format_line_singular() {+ let line = format_line(1, 42, '⠙');+ assert!(line.contains("1 file "));+ assert!(line.contains("42 B"));+ }++ #[test]+ fn test_format_line_plural() {+ let line = format_line(2_500, 5 * 1024 * 1024, '⠹');+ assert!(line.contains("2,500 files"));+ assert!(line.contains("5.0 MiB"));+ }++ #[test]+ fn test_render_line_writes_text_with_prefix_control_bytes() {+ let mut buf = Vec::new();+ render_line(&mut buf, "hello").unwrap();+ assert!(buf.ends_with(b"hello"));+ assert!(buf.len() > b"hello".len());+ }++ #[test]+ fn test_clear_line_writes_control_bytes() {+ let mut buf = Vec::new();+ clear_line(&mut buf).unwrap();+ assert!(!buf.is_empty());+ }++ #[test]+ fn test_disabled_file_copied_is_noop() {+ let p = CopyProgress::disabled();+ p.file_copied(1_000_000);+ p.file_copied(2_000_000);+ // No counters to inspect — Disabled has no fields. The assertion is+ // simply that the call doesn't panic and finish() returns cleanly.+ p.finish();+ }++ #[test]+ fn test_start_in_non_tty_is_disabled() {+ assert!(CopyProgress::start().0.is_none());+ }++ #[test]+ fn test_enabled_lifecycle_counters_propagate() {+ let p = enabled_for_test();+ p.file_copied(1024);+ p.file_copied(2048);+ let inner = p.0.as_ref().expect("expected enabled");+ assert_eq!(inner.shared.files.load(Ordering::Relaxed), 2);+ assert_eq!(inner.shared.bytes.load(Ordering::Relaxed), 3072);+ p.finish();+ }++ #[test]+ fn test_enabled_renders_after_startup_delay() {+ let p = enabled_for_test();+ p.file_copied(100);+ // Wait past the startup delay + one tick so ticker_loop reaches the+ // render branch — the part that's hardest to cover otherwise.+ std::thread::sleep(STARTUP_DELAY + TICK_INTERVAL + Duration::from_millis(50));+ p.finish();+ }+}diff --git a/src/lib.rs b/src/lib.rsindex cfd1726f4..0b40ac3f2 100644--- a/src/lib.rs+++ b/src/lib.rs@@ -11,6 +11,7 @@ pub mod cache;pub mod command_log;pub mod config;pub mod copy;+pub mod copy_progress;pub mod docs;pub mod git;pub mod path;diff --git a/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_bare_repo.snap b/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_bare_repo.snapindex d719f70ca..0604b2819 100644--- a/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_bare_repo.snap+++ b/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_bare_repo.snap@@ -37,4 +37,4 @@ exit_code: 0----- stdout ---------- stderr ------✓ Copied 1 file+✓ Copied 1 file · 12 Bdiff --git a/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_counts_files_not_entries.snap b/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_counts_files_not_entries.snapindex 69be0de19..00c8f3310 100644--- a/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_counts_files_not_entries.snap+++ b/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_counts_files_not_entries.snap@@ -44,4 +44,4 @@ exit_code: 0----- stdout ---------- stderr ------[32m✓[39m [32mCopied 3 files[39m+[32m✓[39m [32mCopied 3 files · 10 B[39mdiff --git a/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_default_copies_all.snap b/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_default_copies_all.snapindex f353b39f9..b05d1d93a 100644--- a/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_default_copies_all.snap+++ b/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_default_copies_all.snap@@ -44,4 +44,4 @@ exit_code: 0----- stdout ---------- stderr ------[32m✓[39m [32mCopied 2 files[39m+[32m✓[39m [32mCopied 2 files · 23 B[39mdiff --git a/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_force_no_existing.snap b/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_force_no_existing.snapindex 4cd223f73..0f76ca4fa 100644--- a/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_force_no_existing.snap+++ b/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_force_no_existing.snap@@ -45,4 +45,4 @@ exit_code: 0----- stdout ---------- stderr ------[32m✓[39m [32mCopied 1 file[39m+[32m✓[39m [32mCopied 1 file · 12 B[39mdiff --git a/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_force_overwrites.snap b/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_force_overwrites.snapindex 4cd223f73..6d22d1cc6 100644--- a/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_force_overwrites.snap+++ b/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_force_overwrites.snap@@ -45,4 +45,4 @@ exit_code: 0----- stdout ---------- stderr ------[32m✓[39m [32mCopied 1 file[39m+[32m✓[39m [32mCopied 1 file · 18 B[39mdiff --git a/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_from_flag.snap b/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_from_flag.snapindex a5f82c6cd..41facf29e 100644--- a/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_from_flag.snap+++ b/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_from_flag.snap@@ -46,4 +46,4 @@ exit_code: 0----- stdout ---------- stderr ------[32m✓[39m [32mCopied 1 file[39m+[32m✓[39m [32mCopied 1 file · 14 B[39mdiff --git a/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_skips_nested_worktrees.snap b/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_skips_nested_worktrees.snapindex 7a5abc263..f5476bf2f 100644--- a/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_skips_nested_worktrees.snap+++ b/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_skips_nested_worktrees.snap@@ -44,4 +44,4 @@ exit_code: 0----- stdout ---------- stderr ------[32m✓[39m [32mCopied 1 file[39m+[32m✓[39m [32mCopied 1 file · 12 B[39mdiff --git a/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_to_flag.snap b/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_to_flag.snapindex e91cac9af..8a95d9654 100644--- a/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_to_flag.snap+++ b/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_to_flag.snap@@ -46,4 +46,4 @@ exit_code: 0----- stdout ---------- stderr ------[32m✓[39m [32mCopied 1 file[39m+[32m✓[39m [32mCopied 1 file · 9 B[39mdiff --git a/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_verbose.snap b/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_verbose.snapindex d456b94fa..85d73a885 100644--- a/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_verbose.snap+++ b/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_verbose.snap@@ -47,4 +47,4 @@ exit_code: 0----- stderr -----[2m○[22m Copying 1 entry:[107m [0m .env (file)-[32m✓[39m [32mCopied 1 file[39m+[32m✓[39m [32mCopied 1 file · 12 B[39mdiff --git a/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_verbose_directory.snap b/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_verbose_directory.snapindex 85815aac4..702a53bae 100644--- a/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_verbose_directory.snap+++ b/tests/snapshots/integration__integration_tests__step_copy_ignored__copy_ignored_verbose_directory.snap@@ -47,4 +47,4 @@ exit_code: 0----- stderr -----[2m○[22m Copying 1 entry:[107m [0m target (dir)-[32m✓[39m [32mCopied 1 file[39m+[32m✓[39m [32mCopied 1 file · 6 B[39m