@@ -316,7 +316,7 @@ public void ParseArgsLine_roundtrips_via_ToRunInputs_as_shipped_path()
316316 }
317317
318318 [ Fact ]
319- public void List_formats_gists_as_owner_filename_from_path_suffix ( )
319+ public void List_formats_gists_as_owner_shortsha_file_from_path_suffix ( )
320320 {
321321 var path = NewSettingsPath ( ) ;
322322 try
@@ -342,7 +342,7 @@ public void List_formats_gists_as_owner_filename_from_path_suffix()
342342
343343 var listed = RunHistory . List ( path ) ;
344344 var gist = listed . Single ( e => e . Input . Contains ( "0ac826dc" , StringComparison . Ordinal ) ) ;
345- Assert . Equal ( "kzu/run.cs" , gist . Display ) ;
345+ Assert . Equal ( "kzu/0ac826d: run.cs" , gist . Display ) ;
346346
347347 var repo = listed . Single ( e => e . Input == "kzu/sandbox" ) ;
348348 Assert . Equal ( "kzu/sandbox" , repo . Display ) ;
@@ -354,7 +354,7 @@ public void List_formats_gists_as_owner_filename_from_path_suffix()
354354 }
355355
356356 [ Fact ]
357- public void List_formats_gists_as_owner_filename_from_cached_entry ( )
357+ public void List_formats_gists_as_owner_shortsha_file_from_cached_entry ( )
358358 {
359359 var path = NewSettingsPath ( ) ;
360360 try
@@ -375,7 +375,7 @@ public void List_formats_gists_as_owner_filename_from_cached_entry()
375375
376376 var listed = RunHistory . List ( path ) ;
377377 Assert . Single ( listed ) ;
378- Assert . Equal ( "kzu/hello.cs" , listed [ 0 ] . Display ) ;
378+ Assert . Equal ( "kzu/aaaaaaa: hello.cs" , listed [ 0 ] . Display ) ;
379379 }
380380 finally
381381 {
@@ -384,7 +384,7 @@ public void List_formats_gists_as_owner_filename_from_cached_entry()
384384 }
385385
386386 [ Fact ]
387- public void List_disambiguates_same_owner_file_with_short_gist_id ( )
387+ public void List_always_includes_short_gist_id_even_for_unique_owner_file ( )
388388 {
389389 var path = NewSettingsPath ( ) ;
390390 try
@@ -424,8 +424,7 @@ public void List_disambiguates_same_owner_file_with_short_gist_id()
424424
425425 Assert . Equal ( "kzu/aaaaaaa:run.cs" , kzuA . Display ) ;
426426 Assert . Equal ( "kzu/bbbbbbb:run.cs" , kzuB . Display ) ;
427- // Different owner — no disambiguation needed even though file name matches.
428- Assert . Equal ( "other/run.cs" , other . Display ) ;
427+ Assert . Equal ( "other/ccccccc:run.cs" , other . Display ) ;
429428 }
430429 finally
431430 {
@@ -464,34 +463,24 @@ public void List_gist_without_known_file_keeps_raw_input()
464463 }
465464
466465 [ Fact ]
467- public void FormatBaseDisplay_and_ShortId_helpers ( )
466+ public void FormatDisplay_and_ShortId_helpers ( )
468467 {
469468 Assert . Equal ( "aaaaaaa" , RunHistory . ShortId ( "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" ) ) ;
470469 Assert . Equal ( "short" , RunHistory . ShortId ( "short" ) ) ;
471470
472- var withPath = RunHistory . FormatBaseDisplay (
473- "gist.github.com/kzu/0ac826dc7de666546aaedd38e5965381:app.cs" ,
474- cachedEntry : null ,
475- out var owner , out var gistId , out var file ) ;
476- Assert . Equal ( "kzu/app.cs" , withPath ) ;
477- Assert . Equal ( "kzu" , owner ) ;
478- Assert . Equal ( "0ac826dc7de666546aaedd38e5965381" , gistId ) ;
479- Assert . Equal ( "app.cs" , file ) ;
480-
481- var withCache = RunHistory . FormatBaseDisplay (
482- "gist.github.com/kzu/0ac826dc7de666546aaedd38e5965381" ,
483- cachedEntry : "from-cache.cs" ,
484- out owner , out gistId , out file ) ;
485- Assert . Equal ( "kzu/from-cache.cs" , withCache ) ;
486- Assert . Equal ( "kzu" , owner ) ;
487- Assert . Equal ( "0ac826dc7de666546aaedd38e5965381" , gistId ) ;
488- Assert . Equal ( "from-cache.cs" , file ) ;
489-
490- var repo = RunHistory . FormatBaseDisplay ( "kzu/sandbox" , null , out owner , out gistId , out file ) ;
491- Assert . Equal ( "kzu/sandbox" , repo ) ;
492- Assert . Null ( owner ) ;
493- Assert . Null ( gistId ) ;
494- Assert . Null ( file ) ;
471+ Assert . Equal (
472+ "kzu/0ac826d:app.cs" ,
473+ RunHistory . FormatDisplay (
474+ "gist.github.com/kzu/0ac826dc7de666546aaedd38e5965381:app.cs" ,
475+ cachedEntry : null ) ) ;
476+
477+ Assert . Equal (
478+ "kzu/0ac826d:from-cache.cs" ,
479+ RunHistory . FormatDisplay (
480+ "gist.github.com/kzu/0ac826dc7de666546aaedd38e5965381" ,
481+ cachedEntry : "from-cache.cs" ) ) ;
482+
483+ Assert . Equal ( "kzu/sandbox" , RunHistory . FormatDisplay ( "kzu/sandbox" , null ) ) ;
495484 }
496485
497486 [ Fact ]
@@ -507,7 +496,7 @@ public void Record_captures_gist_entry_from_path_suffix()
507496 Assert . Equal ( "run.cs" , settings . History ! [ 0 ] . Entry ) ;
508497
509498 var listed = RunHistory . List ( path ) ;
510- Assert . Equal ( "kzu/run.cs" , listed [ 0 ] . Display ) ;
499+ Assert . Equal ( "kzu/0ac826d: run.cs" , listed [ 0 ] . Display ) ;
511500 }
512501 finally
513502 {
@@ -537,7 +526,7 @@ public void List_formats_https_gist_url_with_cached_entry()
537526
538527 var listed = RunHistory . List ( path ) ;
539528 Assert . Single ( listed ) ;
540- Assert . Equal ( "kzu/run.cs" , listed [ 0 ] . Display ) ;
529+ Assert . Equal ( "kzu/0ac826d: run.cs" , listed [ 0 ] . Display ) ;
541530 }
542531 finally
543532 {
0 commit comments