File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ fn find_git_repository_workdirs(
36
36
Some ( gix:: repository:: Kind :: WorkTree { is_linked : true } )
37
37
}
38
38
}
39
- fn into_workdir ( git_dir : PathBuf ) -> PathBuf {
40
- if gix:: discover:: is_bare ( & git_dir) {
39
+ fn into_workdir ( git_dir : PathBuf , kind : & gix :: repository :: Kind ) -> PathBuf {
40
+ if matches ! ( kind , gix :: repository :: Kind :: Bare ) || gix:: discover:: is_bare ( & git_dir) {
41
41
git_dir
42
42
} else {
43
43
git_dir. parent ( ) . expect ( "git is never in the root" ) . to_owned ( )
@@ -81,7 +81,12 @@ fn find_git_repository_workdirs(
81
81
. into_iter ( )
82
82
. inspect ( move |_| progress. inc ( ) )
83
83
. filter_map ( Result :: ok)
84
- . filter_map ( |mut e| e. client_state . kind . take ( ) . map ( |kind| ( into_workdir ( e. path ( ) ) , kind) ) )
84
+ . filter_map ( |mut e| {
85
+ e. client_state
86
+ . kind
87
+ . take ( )
88
+ . map ( |kind| ( into_workdir ( e. path ( ) , & kind) , kind) )
89
+ } )
85
90
}
86
91
87
92
fn find_origin_remote ( repo : & Path ) -> anyhow:: Result < Option < gix_url:: Url > > {
You can’t perform that action at this time.
0 commit comments