@@ -7,6 +7,7 @@ pub struct Context {
77 pub spec : OsString ,
88 pub format : OutputFormat ,
99 pub text : Format ,
10+ pub long_hashes : bool ,
1011}
1112
1213pub enum Format {
@@ -16,16 +17,17 @@ pub enum Format {
1617pub const PROGRESS_RANGE : std:: ops:: RangeInclusive < u8 > = 0 ..=2 ;
1718
1819pub ( crate ) mod function {
20+ use crate :: repository:: HexId ;
21+ use crate :: { repository:: revision:: list:: Format , OutputFormat } ;
1922 use anyhow:: { bail, Context } ;
23+ use gix:: odb:: store:: RefreshMode ;
2024 use gix:: { hashtable:: HashMap , revision:: walk:: Sorting , Progress } ;
2125 use layout:: {
2226 backends:: svg:: SVGWriter ,
2327 core:: { base:: Orientation , geometry:: Point , style:: StyleAttr } ,
2428 std_shapes:: shapes:: { Arrow , Element , ShapeKind } ,
2529 } ;
2630
27- use crate :: { repository:: revision:: list:: Format , OutputFormat } ;
28-
2931 pub fn list (
3032 mut repo : gix:: Repository ,
3133 mut progress : impl Progress ,
@@ -35,12 +37,14 @@ pub(crate) mod function {
3537 format,
3638 text,
3739 limit,
40+ long_hashes,
3841 } : super :: Context ,
3942 ) -> anyhow:: Result < ( ) > {
4043 if format != OutputFormat :: Human {
4144 bail ! ( "Only human output is currently supported" ) ;
4245 }
4346 repo. object_cache_size_if_unset ( 4 * 1024 * 1024 ) ;
47+ repo. objects . refresh = RefreshMode :: Never ;
4448
4549 let spec = gix:: path:: os_str_into_bstr ( & spec) ?;
4650 let id = repo
@@ -101,7 +105,7 @@ pub(crate) mod function {
101105 writeln ! (
102106 out,
103107 "{} {} {}" ,
104- commit. id( ) . shorten_or_id ( ) ,
108+ HexId :: new ( commit. id( ) , long_hashes ) ,
105109 commit. commit_time. expect( "traversal with date" ) ,
106110 commit. parent_ids. len( )
107111 ) ?;
0 commit comments