@@ -127,7 +127,6 @@ pub fn list_worktrees_with_ui(manager: &GitWorktreeManager, _ui: &dyn UserInterf
127127 // Display repository info
128128 let repo_info = get_repository_info ( ) ;
129129 println ! ( "Repository: {}" , repo_info. bright_cyan( ) ) ;
130- println ! ( ) ;
131130
132131 // Calculate column widths
133132 let max_name_len = sorted_worktrees
@@ -207,6 +206,7 @@ mod tests {
207206 fn test_format_worktree_display_basic ( ) {
208207 let worktree = WorktreeInfo {
209208 name : "feature" . to_string ( ) ,
209+ git_name : "feature" . to_string ( ) ,
210210 path : PathBuf :: from ( "/tmp/feature" ) ,
211211 branch : "feature" . to_string ( ) ,
212212 is_current : false ,
@@ -224,6 +224,7 @@ mod tests {
224224 fn test_format_worktree_display_current ( ) {
225225 let worktree = WorktreeInfo {
226226 name : "main" . to_string ( ) ,
227+ git_name : "main" . to_string ( ) ,
227228 path : PathBuf :: from ( "/tmp/main" ) ,
228229 branch : "main" . to_string ( ) ,
229230 is_current : true ,
@@ -241,6 +242,7 @@ mod tests {
241242 fn test_format_worktree_display_locked_changes ( ) {
242243 let worktree = WorktreeInfo {
243244 name : "locked" . to_string ( ) ,
245+ git_name : "locked" . to_string ( ) ,
244246 path : PathBuf :: from ( "/tmp/locked" ) ,
245247 branch : "locked" . to_string ( ) ,
246248 is_current : false ,
@@ -258,6 +260,7 @@ mod tests {
258260 fn test_format_worktree_display_verbose ( ) {
259261 let worktree = WorktreeInfo {
260262 name : "feature" . to_string ( ) ,
263+ git_name : "feature" . to_string ( ) ,
261264 path : PathBuf :: from ( "/tmp/feature" ) ,
262265 branch : "feature" . to_string ( ) ,
263266 is_current : false ,
@@ -275,6 +278,7 @@ mod tests {
275278 fn test_should_show_worktree_with_filter_match ( ) {
276279 let worktree = WorktreeInfo {
277280 name : "feature-auth" . to_string ( ) ,
281+ git_name : "feature-auth" . to_string ( ) ,
278282 path : PathBuf :: from ( "/tmp/feature" ) ,
279283 branch : "feature" . to_string ( ) ,
280284 is_current : false ,
@@ -291,6 +295,7 @@ mod tests {
291295 fn test_should_show_worktree_with_filter_no_match ( ) {
292296 let worktree = WorktreeInfo {
293297 name : "feature-ui" . to_string ( ) ,
298+ git_name : "feature-ui" . to_string ( ) ,
294299 path : PathBuf :: from ( "/tmp/feature" ) ,
295300 branch : "feature" . to_string ( ) ,
296301 is_current : false ,
@@ -307,6 +312,7 @@ mod tests {
307312 fn test_should_show_worktree_show_all ( ) {
308313 let worktree = WorktreeInfo {
309314 name : "clean" . to_string ( ) ,
315+ git_name : "clean" . to_string ( ) ,
310316 path : PathBuf :: from ( "/tmp/clean" ) ,
311317 branch : "clean" . to_string ( ) ,
312318 is_current : false ,
@@ -323,6 +329,7 @@ mod tests {
323329 fn test_should_show_worktree_only_changes ( ) {
324330 let clean_worktree = WorktreeInfo {
325331 name : "clean" . to_string ( ) ,
332+ git_name : "clean" . to_string ( ) ,
326333 path : PathBuf :: from ( "/tmp/clean" ) ,
327334 branch : "clean" . to_string ( ) ,
328335 is_current : false ,
@@ -334,6 +341,7 @@ mod tests {
334341
335342 let dirty_worktree = WorktreeInfo {
336343 name : "dirty" . to_string ( ) ,
344+ git_name : "dirty" . to_string ( ) ,
337345 path : PathBuf :: from ( "/tmp/dirty" ) ,
338346 branch : "dirty" . to_string ( ) ,
339347 is_current : false ,
@@ -354,6 +362,7 @@ mod tests {
354362 let test_path = "/tmp/feature" ;
355363 let worktree = WorktreeInfo {
356364 name : "feature" . to_string ( ) ,
365+ git_name : "feature" . to_string ( ) ,
357366 path : PathBuf :: from ( test_path) ,
358367 branch : "feature" . to_string ( ) ,
359368 is_current : false ,
@@ -379,6 +388,7 @@ mod tests {
379388 let behind_count = 3 ;
380389 let worktree = WorktreeInfo {
381390 name : "feature" . to_string ( ) ,
391+ git_name : "feature" . to_string ( ) ,
382392 path : PathBuf :: from ( "/tmp/feature" ) ,
383393 branch : "feature" . to_string ( ) ,
384394 is_current : false ,
@@ -397,6 +407,7 @@ mod tests {
397407 let worktree_name = "complex" ;
398408 let worktree = WorktreeInfo {
399409 name : worktree_name. to_string ( ) ,
410+ git_name : worktree_name. to_string ( ) ,
400411 path : PathBuf :: from ( "/tmp/complex" ) ,
401412 branch : "complex" . to_string ( ) ,
402413 is_current : true ,
@@ -417,6 +428,7 @@ mod tests {
417428 fn test_should_show_worktree_empty_filter ( ) {
418429 let worktree = WorktreeInfo {
419430 name : "any" . to_string ( ) ,
431+ git_name : "any" . to_string ( ) ,
420432 path : PathBuf :: from ( "/tmp/any" ) ,
421433 branch : "any" . to_string ( ) ,
422434 is_current : false ,
@@ -436,6 +448,7 @@ mod tests {
436448 let no_match_filter = "ui" ;
437449 let worktree = WorktreeInfo {
438450 name : "feature-auth-login" . to_string ( ) ,
451+ git_name : "feature-auth-login" . to_string ( ) ,
439452 path : PathBuf :: from ( "/tmp/feature" ) ,
440453 branch : "feature" . to_string ( ) ,
441454 is_current : false ,
@@ -462,6 +475,7 @@ mod tests {
462475 // Create test worktrees with one being current
463476 let worktree1 = WorktreeInfo {
464477 name : "zebra" . to_string ( ) ,
478+ git_name : "zebra" . to_string ( ) ,
465479 path : PathBuf :: from ( "/tmp/zebra" ) ,
466480 branch : "zebra" . to_string ( ) ,
467481 is_current : false ,
@@ -472,6 +486,7 @@ mod tests {
472486 } ;
473487 let worktree2 = WorktreeInfo {
474488 name : "alpha" . to_string ( ) ,
489+ git_name : "alpha" . to_string ( ) ,
475490 path : PathBuf :: from ( "/tmp/alpha" ) ,
476491 branch : "alpha" . to_string ( ) ,
477492 is_current : true ,
@@ -482,6 +497,7 @@ mod tests {
482497 } ;
483498 let worktree3 = WorktreeInfo {
484499 name : "beta" . to_string ( ) ,
500+ git_name : "beta" . to_string ( ) ,
485501 path : PathBuf :: from ( "/tmp/beta" ) ,
486502 branch : "beta" . to_string ( ) ,
487503 is_current : false ,
@@ -517,6 +533,7 @@ mod tests {
517533 let worktrees = vec ! [
518534 WorktreeInfo {
519535 name: "short" . to_string( ) ,
536+ git_name: "short" . to_string( ) ,
520537 path: PathBuf :: from( "/tmp/short" ) ,
521538 branch: "main" . to_string( ) ,
522539 is_current: false ,
@@ -527,6 +544,7 @@ mod tests {
527544 } ,
528545 WorktreeInfo {
529546 name: "very-long-worktree-name" . to_string( ) ,
547+ git_name: "very-long-worktree-name" . to_string( ) ,
530548 path: PathBuf :: from( "/tmp/very-long-worktree-name" ) ,
531549 branch: "feature-with-very-long-branch-name" . to_string( ) ,
532550 is_current: true ,
@@ -562,6 +580,7 @@ mod tests {
562580 fn test_table_display_icon_selection ( ) {
563581 let current_worktree = WorktreeInfo {
564582 name : "current" . to_string ( ) ,
583+ git_name : "current" . to_string ( ) ,
565584 path : PathBuf :: from ( "/tmp/current" ) ,
566585 branch : "main" . to_string ( ) ,
567586 is_current : true ,
@@ -572,6 +591,7 @@ mod tests {
572591 } ;
573592 let other_worktree = WorktreeInfo {
574593 name : "other" . to_string ( ) ,
594+ git_name : "other" . to_string ( ) ,
575595 path : PathBuf :: from ( "/tmp/other" ) ,
576596 branch : "feature" . to_string ( ) ,
577597 is_current : false ,
@@ -601,6 +621,7 @@ mod tests {
601621 fn test_table_display_branch_formatting ( ) {
602622 let current_worktree = WorktreeInfo {
603623 name : "current" . to_string ( ) ,
624+ git_name : "current" . to_string ( ) ,
604625 path : PathBuf :: from ( "/tmp/current" ) ,
605626 branch : "main" . to_string ( ) ,
606627 is_current : true ,
@@ -611,6 +632,7 @@ mod tests {
611632 } ;
612633 let other_worktree = WorktreeInfo {
613634 name : "other" . to_string ( ) ,
635+ git_name : "other" . to_string ( ) ,
614636 path : PathBuf :: from ( "/tmp/other" ) ,
615637 branch : "feature" . to_string ( ) ,
616638 is_current : false ,
@@ -640,6 +662,7 @@ mod tests {
640662 fn test_table_display_modified_status ( ) {
641663 let clean_worktree = WorktreeInfo {
642664 name : "clean" . to_string ( ) ,
665+ git_name : "clean" . to_string ( ) ,
643666 path : PathBuf :: from ( "/tmp/clean" ) ,
644667 branch : "main" . to_string ( ) ,
645668 is_current : false ,
@@ -650,6 +673,7 @@ mod tests {
650673 } ;
651674 let dirty_worktree = WorktreeInfo {
652675 name : "dirty" . to_string ( ) ,
676+ git_name : "dirty" . to_string ( ) ,
653677 path : PathBuf :: from ( "/tmp/dirty" ) ,
654678 branch : "feature" . to_string ( ) ,
655679 is_current : false ,
0 commit comments