Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Fix: Ensure column headers are considered for width calculation
Maximilian Roos016cb02cc243
diff --git a/src/commands/list/layout.rs b/src/commands/list/layout.rsindex b6dbba09e..92c6090e8 100644--- a/src/commands/list/layout.rs+++ b/src/commands/list/layout.rs@@ -43,14 +43,15 @@ pub struct LayoutConfig {}pub fn calculate_column_widths(infos: &[WorktreeInfo]) -> ColumnWidths {- let mut max_branch = 0;- let mut max_time = 0;- let mut max_message = 0;- let mut max_ahead_behind = 0;- let mut max_working_diff = 0;- let mut max_branch_diff = 0;- let mut max_upstream = 0;- let mut max_states = 0;+ // Initialize with header label widths to ensure headers always fit+ let mut max_branch = "Branch".width();+ let mut max_time = "Age".width();+ let mut max_message = "Message".width();+ let mut max_ahead_behind = "Cmts".width();+ let mut max_working_diff = "WT +/-".width();+ let mut max_branch_diff = "Cmt +/-".width();+ let mut max_upstream = "Remote".width();+ let mut max_states = "State".width();for info in infos {// Branch namediff --git a/src/commands/list/mod.rs b/src/commands/list/mod.rsindex ebaa0019a..5ca665f15 100644--- a/src/commands/list/mod.rs+++ b/src/commands/list/mod.rs@@ -1,6 +1,9 @@mod layout;mod render;+#[cfg(test)]+mod spacing_test;+use rayon::prelude::*;use worktrunk::git::{GitError, Repository};diff --git a/src/commands/list/spacing_test.rs b/src/commands/list/spacing_test.rsnew file mode 100644index 000000000..644bb0414--- /dev/null+++ b/src/commands/list/spacing_test.rs@@ -0,0 +1,84 @@+//! Test to reproduce the spacing alignment bug+//!+//! This test verifies that header and data rows align properly,+//! regardless of whether cells have ANSI styling applied.++use worktrunk::styling::{StyledLine, dim_style, primary_style};++#[test]+fn test_header_data_alignment_with_and_without_styling() {+ // Simulate what happens in the actual rendering+ let dim = dim_style();+ let primary = primary_style();++ // Header (always styled with dim)+ let mut header = StyledLine::new();+ let branch_width = 6;+ let branch_header = format!("{:width$}", "Branch", width = branch_width);+ header.push_styled(branch_header, dim);+ header.push_raw(" "); // separator+ let age_header = format!("{:width$}", "Age", width = 14);+ header.push_styled(age_header, dim);++ println!(+ "Header visual: |{}|",+ header.render().replace("\x1b", "\\x1b")+ );++ // Data row 1: with styling (styled cell)+ let mut row1 = StyledLine::new();+ let branch1_text = format!("{:width$}", "main", width = branch_width);+ row1.push_styled(branch1_text.clone(), primary); // Styled+ row1.push_raw(" "); // separator+ let time1_text = format!("{:width$}", "23 minutes ago", width = 14);+ row1.push_styled(time1_text, dim);++ println!(+ "Row 1 styled visual: |{}|",+ row1.render().replace("\x1b", "\\x1b")+ );+ println!(+ "Row 1 styled: branch_text='{}' len={}",+ branch1_text,+ branch1_text.len()+ );++ // Data row 2: without styling (raw cell)+ let mut row2 = StyledLine::new();+ let branch2_text = format!("{:width$}", "foo", width = branch_width);+ row2.push_raw(branch2_text.clone()); // NOT styled+ row2.push_raw(" "); // separator+ let time2_text = format!("{:width$}", "23 minutes ago", width = 14);+ row2.push_styled(time2_text, dim);++ println!(+ "Row 2 unstyled visual: |{}|",+ row2.render().replace("\x1b", "\\x1b")+ );+ println!(+ "Row 2 unstyled: branch_text='{}' len={}",+ branch2_text,+ branch2_text.len()+ );++ // Check that all rows have the same width up to the time column+ let header_width_before_time = branch_width + 2; // branch + separator+ let row1_width_before_time = branch_width + 2;+ let row2_width_before_time = branch_width + 2;++ println!(+ "\nExpected width before time column: {}",+ header_width_before_time+ );+ println!("Row 1 width before time: {}", row1_width_before_time);+ println!("Row 2 width before time: {}", row2_width_before_time);++ assert_eq!(+ header_width_before_time, row1_width_before_time,+ "Header and styled row should align"+ );+ assert_eq!(+ header_width_before_time, row2_width_before_time,+ "Header and unstyled row should align"+ );+}diff --git a/tests/integration_tests/mod.rs b/tests/integration_tests/mod.rsindex 60b9bed3b..619f5dbaa 100644--- a/tests/integration_tests/mod.rs+++ b/tests/integration_tests/mod.rs@@ -7,4 +7,5 @@ pub mod list;pub mod merge;pub mod push;pub mod remove;+pub mod spacing_edge_cases;pub mod switch;diff --git a/tests/integration_tests/spacing_edge_cases.rs b/tests/integration_tests/spacing_edge_cases.rsnew file mode 100644index 000000000..d06ce9ea0--- /dev/null+++ b/tests/integration_tests/spacing_edge_cases.rs@@ -0,0 +1,92 @@+use crate::common::TestRepo;+use insta::Settings;+use insta_cmd::{assert_cmd_snapshot, get_cargo_bin};+use std::process::Command;++/// Helper to create snapshot with normalized paths and SHAs+fn snapshot_list(test_name: &str, repo: &TestRepo) {+ let mut settings = Settings::clone_current();+ settings.set_snapshot_path("../snapshots");++ // Normalize paths+ settings.add_filter(repo.root_path().to_str().unwrap(), "[REPO]");+ for (name, path) in &repo.worktrees {+ settings.add_filter(+ path.to_str().unwrap(),+ format!("[WORKTREE_{}]", name.to_uppercase().replace('-', "_")),+ );+ }++ // Normalize git SHAs+ settings.add_filter(r"\b[0-9a-f]{7,40}\b", "[SHA] ");+ settings.add_filter(r"\\", "/");++ settings.bind(|| {+ let mut cmd = Command::new(get_cargo_bin("wt"));+ repo.clean_cli_env(&mut cmd);+ cmd.arg("list").current_dir(repo.root_path());+ assert_cmd_snapshot!(test_name, cmd);+ });+}++#[test]+fn test_short_branch_names_shorter_than_header() {+ let mut repo = TestRepo::new();+ repo.commit("Initial commit");++ // Create worktrees with very short branch names (shorter than "Branch" header)+ repo.add_worktree("a", "a");+ repo.add_worktree("bb", "bb");+ repo.add_worktree("ccc", "ccc");++ snapshot_list("short_branch_names", &repo);+}++#[test]+fn test_long_branch_names_longer_than_header() {+ let mut repo = TestRepo::new();+ repo.commit("Initial commit");++ // Create worktrees with very long branch names+ repo.add_worktree(+ "very-long-feature-branch-name",+ "very-long-feature-branch-name",+ );+ repo.add_worktree(+ "another-extremely-long-name-here",+ "another-extremely-long-name-here",+ );+ repo.add_worktree("short", "short");++ snapshot_list("long_branch_names", &repo);+}++#[test]+fn test_unicode_branch_names_width_calculation() {+ let mut repo = TestRepo::new();+ repo.commit("Initial commit");++ // Create worktrees with unicode characters that have different visual widths+ // Note: Git may have restrictions on branch names, so use valid characters+ repo.add_worktree("café", "cafe");+ repo.add_worktree("naïve", "naive");+ repo.add_worktree("résumé", "resume");++ snapshot_list("unicode_branch_names", &repo);+}++#[test]+fn test_mixed_length_branch_names() {+ let mut repo = TestRepo::new();+ repo.commit("Initial commit");++ // Mix of very short, medium, and very long branch names+ repo.add_worktree("x", "x");+ repo.add_worktree("medium-length-name", "medium");+ repo.add_worktree(+ "extremely-long-branch-name-that-might-cause-layout-issues",+ "long",+ );++ snapshot_list("mixed_length_branch_names", &repo);+}diff --git a/tests/snapshots/integration__integration_tests__list__detached_head.snap b/tests/snapshots/integration__integration_tests__list__detached_head.snapindex 004bc97b3..083da6dac 100644--- a/tests/snapshots/integration__integration_tests__list__detached_head.snap+++ b/tests/snapshots/integration__integration_tests__list__detached_head.snap@@ -18,7 +18,7 @@ info:success: trueexit_code: 0----- stdout ------[2mBranch [0m [2mAge [0m [2mCommit [0m [2mMessage [0m [2mPath[0m-[1m[35m(detached)[0m [2m9 months ago[0m [1m[35mb834638e[0m [2mInitial commit [0m [1m[35m.[0m+[2mBranch [0m [2mAge [0m [2mCmts[0m [2mCmt +/-[0m [2mWT +/-[0m [2mRemote[0m [2mCommit [0m [2mMessage [0m [2mState[0m [2mPath[0m+[1m[35m(detached)[0m [2m9 months ago[0m [1m[35mb834638e[0m [2mInitial commit [0m [1m[35m.[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__list__locked_no_reason.snap b/tests/snapshots/integration__integration_tests__list__locked_no_reason.snapindex 5b9c78dd4..074311edd 100644--- a/tests/snapshots/integration__integration_tests__list__locked_no_reason.snap+++ b/tests/snapshots/integration__integration_tests__list__locked_no_reason.snap@@ -18,8 +18,8 @@ info:success: trueexit_code: 0----- stdout ------[2mBranch [0m [2mAge [0m [2mCommit [0m [2mState [0m [2mPath[0m-[1m[35mmain [0m [2m9 months ago[0m [1m[35mb834638e[0m [1m[35m./main[0m-locked-no-reason [2m9 months ago[0m [SHA] (locked) ./locked-no-reason+[2mBranch [0m [2mAge [0m [2mCmts[0m [2mCmt +/-[0m [2mWT +/-[0m [2mRemote[0m [2mCommit [0m [2mState [0m [2mPath[0m+[1m[35mmain [0m [2m9 months ago[0m [1m[35mb834638e[0m [1m[35m./main[0m+locked-no-reason [2m9 months ago[0m [SHA] (locked) ./locked-no-reason----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__list__locked_worktree.snap b/tests/snapshots/integration__integration_tests__list__locked_worktree.snapindex 8a84c57aa..cf0bcb200 100644--- a/tests/snapshots/integration__integration_tests__list__locked_worktree.snap+++ b/tests/snapshots/integration__integration_tests__list__locked_worktree.snap@@ -18,8 +18,8 @@ info:success: trueexit_code: 0----- stdout ------[2mBranch [0m [2mAge [0m [2mCommit [0m [2mState [0m [2mPath[0m-[1m[35mmain [0m [2m9 months ago[0m [1m[35mb834638e[0m [1m[35m./main[0m-locked-feature [2m9 months ago[0m [SHA] (locked: Testing lock functionality) ./locked-feature+[2mBranch [0m [2mAge [0m [2mCmts[0m [2mCmt +/-[0m [2mWT +/-[0m [2mRemote[0m [2mCommit [0m [2mState [0m [2mPath[0m+[1m[35mmain [0m [2m9 months ago[0m [1m[35mb834638e[0m [1m[35m./main[0m+locked-feature [2m9 months ago[0m [SHA] (locked: Testing lock functionality) ./locked-feature----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__list__long_branch_name.snap b/tests/snapshots/integration__integration_tests__list__long_branch_name.snapindex 72d9204fb..1daa23ef1 100644--- a/tests/snapshots/integration__integration_tests__list__long_branch_name.snap+++ b/tests/snapshots/integration__integration_tests__list__long_branch_name.snap@@ -18,8 +18,8 @@ info:success: trueexit_code: 0----- stdout ------[2mBranch [0m [2mCommit [0m [2mPath[0m-[1m[35mmain [0m [1m[35mb834638e[0m [1m[35m./main[0m-feature-this-is-a-very-long-branch-name-that-should-test-column-alignment [SHA] ./feature-this-is-a-very-long-branch-name-that-should-test-column-alignment+[2mBranch [0m [2mCmts[0m [2mCmt +/-[0m [2mWT +/-[0m [2mRemote[0m [2mCommit [0m [2mState[0m [2mPath[0m+[1m[35mmain [0m [1m[35mb834638e[0m [1m[35m./main[0m+feature-this-is-a-very-long-branch-name-that-should-test-column-alignment [SHA] ./feature-this-is-a-very-long-branch-name-that-should-test-column-alignment----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__list__long_commit_message.snap b/tests/snapshots/integration__integration_tests__list__long_commit_message.snapindex e06c3a7a9..3038f1011 100644--- a/tests/snapshots/integration__integration_tests__list__long_commit_message.snap+++ b/tests/snapshots/integration__integration_tests__list__long_commit_message.snap@@ -18,8 +18,8 @@ info:success: trueexit_code: 0----- stdout ------[2mBranch [0m [2mAge [0m [2mCmts [0m [2mCommit [0m [2mMessage [0m [2mPath[0m-[1m[35mmain [0m [2m9 months ago[0m [1m[35m1310bfb9[0m [2mShort message [0m [1m[35m./main[0m-feature-a [2m9 months ago[0m [33m↑0 ↓1[0m [SHA] [2mThis is a very... [0m ./feature-a+[2mBranch [0m [2mAge [0m [2mCmts [0m [2mCmt +/-[0m [2mWT +/-[0m [2mRemote[0m [2mCommit [0m [2mMessage [0m [2mState[0m [2mPath[0m+[1m[35mmain [0m [2m9 months ago[0m [1m[35m1310bfb9[0m [2mShort message [0m [1m[35m./main[0m+feature-a [2m9 months ago[0m [33m↑0 ↓1[0m [SHA] [2mThis is a very... [0m ./feature-a----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__list__many_worktrees_varied.snap b/tests/snapshots/integration__integration_tests__list__many_worktrees_varied.snapindex 810392251..fa9c5240d 100644--- a/tests/snapshots/integration__integration_tests__list__many_worktrees_varied.snap+++ b/tests/snapshots/integration__integration_tests__list__many_worktrees_varied.snap@@ -18,11 +18,11 @@ info:success: trueexit_code: 0----- stdout ------[2mBranch [0m [2mAge [0m [2mCommit [0m [2mPath[0m-[1m[35mmain [0m [2m9 months ago[0m [1m[35mb834638e[0m [1m[35m./main[0m-medium-name [2m9 months ago[0m [SHA] ./medium-name-short [2m9 months ago[0m [SHA] ./short-very-long-branch-name-here [2m9 months ago[0m [SHA] ./very-long-branch-name-here-with-changes [2m9 months ago[0m [SHA] ./with-changes+[2mBranch [0m [2mAge [0m [2mCmts[0m [2mCmt +/-[0m [2mWT +/-[0m [2mRemote[0m [2mCommit [0m [2mState[0m [2mPath[0m+[1m[35mmain [0m [2m9 months ago[0m [1m[35mb834638e[0m [1m[35m./main[0m+medium-name [2m9 months ago[0m [SHA] ./medium-name+short [2m9 months ago[0m [SHA] ./short+very-long-branch-name-here [2m9 months ago[0m [SHA] ./very-long-branch-name-here+with-changes [2m9 months ago[0m [SHA] ./with-changes----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__list__multiple_worktrees.snap b/tests/snapshots/integration__integration_tests__list__multiple_worktrees.snapindex 195826e73..5f3111c8c 100644--- a/tests/snapshots/integration__integration_tests__list__multiple_worktrees.snap+++ b/tests/snapshots/integration__integration_tests__list__multiple_worktrees.snap@@ -18,9 +18,9 @@ info:success: trueexit_code: 0----- stdout ------[2mBranch [0m [2mAge [0m [2mCommit [0m [2mMessage [0m [2mPath[0m-[1m[35mmain [0m [2m9 months ago[0m [1m[35mb834638e[0m [2mInitial commit [0m [1m[35m./main[0m-feature-a [2m9 months ago[0m [SHA] [2mInitial commit [0m ./feature-a-feature-b [2m9 months ago[0m [SHA] [2mInitial commit [0m ./feature-b+[2mBranch [0m [2mAge [0m [2mCmts[0m [2mCmt +/-[0m [2mWT +/-[0m [2mRemote[0m [2mCommit [0m [2mMessage [0m [2mState[0m [2mPath[0m+[1m[35mmain [0m [2m9 months ago[0m [1m[35mb834638e[0m [2mInitial commit [0m [1m[35m./main[0m+feature-a [2m9 months ago[0m [SHA] [2mInitial commit [0m ./feature-a+feature-b [2m9 months ago[0m [SHA] [2mInitial commit [0m ./feature-b----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__list__single_worktree.snap b/tests/snapshots/integration__integration_tests__list__single_worktree.snapindex 003914fe5..ecd3144da 100644--- a/tests/snapshots/integration__integration_tests__list__single_worktree.snap+++ b/tests/snapshots/integration__integration_tests__list__single_worktree.snap@@ -18,7 +18,7 @@ info:success: trueexit_code: 0----- stdout ------[2mBranch[0m [2mAge [0m [2mCommit [0m [2mMessage [0m [2mPath[0m-[1m[35mmain[0m [2m9 months ago[0m [1m[35mb834638e[0m [2mInitial commit [0m [1m[35m.[0m+[2mBranch[0m [2mAge [0m [2mCmts[0m [2mCmt +/-[0m [2mWT +/-[0m [2mRemote[0m [2mCommit [0m [2mMessage [0m [2mState[0m [2mPath[0m+[1m[35mmain [0m [2m9 months ago[0m [1m[35mb834638e[0m [2mInitial commit [0m [1m[35m.[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__list__unicode_branch_name.snap b/tests/snapshots/integration__integration_tests__list__unicode_branch_name.snapindex b5fd47d5f..2150a5f78 100644--- a/tests/snapshots/integration__integration_tests__list__unicode_branch_name.snap+++ b/tests/snapshots/integration__integration_tests__list__unicode_branch_name.snap@@ -18,9 +18,9 @@ info:success: trueexit_code: 0----- stdout ------[2mBranch [0m [2mAge [0m [2mCommit [0m [2mPath[0m-[1m[35mmain [0m [2m9 months ago[0m [1m[35mb834638e[0m [1m[35m./main[0m-feature-日本語-test [2m9 months ago[0m [SHA] ./feature-日本語-test-fix-émoji-🎉 [2m9 months ago[0m [SHA] ./fix-émoji-🎉+[2mBranch [0m [2mAge [0m [2mCmts[0m [2mCmt +/-[0m [2mWT +/-[0m [2mRemote[0m [2mCommit [0m [2mState[0m [2mPath[0m+[1m[35mmain [0m [2m9 months ago[0m [1m[35mb834638e[0m [1m[35m./main[0m+feature-日本語-test [2m9 months ago[0m [SHA] ./feature-日本語-test+fix-émoji-🎉 [2m9 months ago[0m [SHA] ./fix-émoji-🎉----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap b/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snapindex d20107656..43a4b9dec 100644--- a/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap+++ b/tests/snapshots/integration__integration_tests__list__unicode_commit_message.snap@@ -18,8 +18,8 @@ info:success: trueexit_code: 0----- stdout ------[2mBranch [0m [2mAge [0m [2mCmts [0m [2mCommit [0m [2mPath[0m-[1m[35mmain [0m [2m9 months ago[0m [1m[35me4614cb7[0m [1m[35m./main[0m-feature-test [2m9 months ago[0m [33m↑0 ↓1[0m [SHA] ./feature-test+[2mBranch [0m [2mAge [0m [2mCmts [0m [2mCmt +/-[0m [2mWT +/-[0m [2mRemote[0m [2mCommit [0m [2mState[0m [2mPath[0m+[1m[35mmain [0m [2m9 months ago[0m [1m[35me4614cb7[0m [1m[35m./main[0m+feature-test [2m9 months ago[0m [33m↑0 ↓1[0m [SHA] ./feature-test----- stderr -----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.snapnew file mode 100644index 000000000..364260c9f--- /dev/null+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__long_branch_names.snap@@ -0,0 +1,27 @@+---+source: tests/integration_tests/spacing_edge_cases.rs+info:+ program: wt+ args:+ - list+ env:+ CLICOLOR_FORCE: "1"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_CONFIG_GLOBAL: /dev/null+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""+ LANG: C+ LC_ALL: C+ SOURCE_DATE_EPOCH: "1704067200"+---+success: true+exit_code: 0+----- stdout -----+[2mBranch [0m [2mAge [0m [2mCmts[0m [2mCmt +/-[0m [2mWT +/-[0m [2mRemote[0m [2mCommit [0m [2mState[0m [2mPath[0m+[1m[35mmain [0m [2m9 months ago[0m [1m[35mb834638e[0m [1m[35m./main[0m+another-extremely-long-name-here [2m9 months ago[0m [SHA] ./another-extremely-long-name-here+short [2m9 months ago[0m [SHA] ./short+very-long-feature-branch-name [2m9 months ago[0m [SHA] ./very-long-feature-branch-name++----- stderr -----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.snapnew file mode 100644index 000000000..8c2be8020--- /dev/null+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__mixed_length_branch_names.snap@@ -0,0 +1,27 @@+---+source: tests/integration_tests/spacing_edge_cases.rs+info:+ program: wt+ args:+ - list+ env:+ CLICOLOR_FORCE: "1"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_CONFIG_GLOBAL: /dev/null+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""+ LANG: C+ LC_ALL: C+ SOURCE_DATE_EPOCH: "1704067200"+---+success: true+exit_code: 0+----- stdout -----+[2mBranch[0m [2mAge [0m [2mCmts[0m [2mCmt +/-[0m [2mWT +/-[0m [2mRemote[0m [2mCommit [0m [2mMessage [0m [2mState[0m [2mPath[0m+[1m[35mmain [0m [2m9 months ago[0m [1m[35mb834638e[0m [2mInitial commit [0m [1m[35m./main[0m+long [2m9 months ago[0m [SHA] [2mInitial commit [0m ./extremely-long-branch-name-that-might-cause-layout-issues+medium [2m9 months ago[0m [SHA] [2mInitial commit [0m ./medium-length-name+x [2m9 months ago[0m [SHA] [2mInitial commit [0m ./x++----- stderr -----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.snapnew file mode 100644index 000000000..3db8243b1--- /dev/null+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__short_branch_names.snap@@ -0,0 +1,27 @@+---+source: tests/integration_tests/spacing_edge_cases.rs+info:+ program: wt+ args:+ - list+ env:+ CLICOLOR_FORCE: "1"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_CONFIG_GLOBAL: /dev/null+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""+ LANG: C+ LC_ALL: C+ SOURCE_DATE_EPOCH: "1704067200"+---+success: true+exit_code: 0+----- stdout -----+[2mBranch[0m [2mAge [0m [2mCmts[0m [2mCmt +/-[0m [2mWT +/-[0m [2mRemote[0m [2mCommit [0m [2mMessage [0m [2mState[0m [2mPath[0m+[1m[35mmain [0m [2m9 months ago[0m [1m[35mb834638e[0m [2mInitial commit [0m [1m[35m./main[0m+a [2m9 months ago[0m [SHA] [2mInitial commit [0m ./a+bb [2m9 months ago[0m [SHA] [2mInitial commit [0m ./bb+ccc [2m9 months ago[0m [SHA] [2mInitial commit [0m ./ccc++----- stderr -----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.snapnew file mode 100644index 000000000..e2b21c675--- /dev/null+++ b/tests/snapshots/integration__integration_tests__spacing_edge_cases__unicode_branch_names.snap@@ -0,0 +1,27 @@+---+source: tests/integration_tests/spacing_edge_cases.rs+info:+ program: wt+ args:+ - list+ env:+ CLICOLOR_FORCE: "1"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_CONFIG_GLOBAL: /dev/null+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_EDITOR: ""+ LANG: C+ LC_ALL: C+ SOURCE_DATE_EPOCH: "1704067200"+---+success: true+exit_code: 0+----- stdout -----+[2mBranch[0m [2mAge [0m [2mCmts[0m [2mCmt +/-[0m [2mWT +/-[0m [2mRemote[0m [2mCommit [0m [2mMessage [0m [2mState[0m [2mPath[0m+[1m[35mmain [0m [2m9 months ago[0m [1m[35mb834638e[0m [2mInitial commit [0m [1m[35m./main[0m+cafe [2m9 months ago[0m [SHA] [2mInitial commit [0m ./café+naive [2m9 months ago[0m [SHA] [2mInitial commit [0m ./naïve+resume [2m9 months ago[0m [SHA] [2mInitial commit [0m ./résumé++----- stderr -----