File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ use gix::{
5
5
sec:: { self , trust:: DefaultForLevel } ,
6
6
Repository , ThreadSafeRepository ,
7
7
} ;
8
- use log:: { debug, error } ;
8
+ use log:: debug;
9
9
use std:: path:: Path ;
10
10
use std:: process:: Command ;
11
11
use std:: { path:: PathBuf , process:: exit} ;
@@ -40,7 +40,7 @@ fn main() {
40
40
let progress_status = match repo_progress ( path) {
41
41
Ok ( output) => output,
42
42
Err ( e) => {
43
- error ! ( "{e}" ) ;
43
+ debug ! ( "{e}" ) ;
44
44
exit ( 1 ) ;
45
45
}
46
46
} ;
@@ -105,10 +105,12 @@ fn repo_progress(path: PathBuf) -> Result<String> {
105
105
106
106
let git_repo = repo. repo . to_thread_local ( ) ;
107
107
108
- let display_name = repo
109
- . branch
110
- . or_else ( || get_tag ( & git_repo) )
111
- . or_else ( || Some ( git_repo. head_id ( ) . ok ( ) ?. shorten_or_id ( ) . to_string ( ) ) ) ;
108
+ let display_name = repo. branch . or_else ( || get_tag ( & git_repo) ) . or_else ( || {
109
+ Some ( format ! (
110
+ "(detached {})" ,
111
+ git_repo. head_id( ) . ok( ) ?. shorten_or_id( )
112
+ ) )
113
+ } ) ;
112
114
113
115
let display_name = display_name. ok_or_else ( || anyhow ! ( "Failed to get branch/hash" ) ) ?;
114
116
You can’t perform that action at this time.
0 commit comments