File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -260,8 +260,9 @@ impl<'gctx> PathSource<'gctx> {
260
260
Ok ( None )
261
261
}
262
262
263
- /// Returns [`Some(gix::Repository)`](gix::Repository) if there is a sibling `Cargo.toml` and `.git`
264
- /// directory; otherwise, the caller should fall back on full file list.
263
+ /// Returns [`Some(gix::Repository)`](gix::Repository) if the discovered repository
264
+ /// (searched upwards from `root`) contains a tracked `Cargo.toml`. Otherwise,
265
+ /// the caller should fall back on full file list.
265
266
fn discover_gix_repo ( & self , root : & Path ) -> CargoResult < Option < gix:: Repository > > {
266
267
let repo = match gix:: ThreadSafeRepository :: discover ( root) {
267
268
Ok ( repo) => repo. to_thread_local ( ) ,
@@ -496,7 +497,7 @@ impl<'gctx> PathSource<'gctx> {
496
497
497
498
let pkg_path = pkg. root ( ) ;
498
499
let mut target_prefix;
499
- let repo_relative_pkg_path = pkg_path. strip_prefix ( root) . ok ( ) . unwrap_or ( Path :: new ( "" ) ) ;
500
+ let repo_relative_pkg_path = pkg_path. strip_prefix ( root) . unwrap_or ( Path :: new ( "" ) ) ;
500
501
501
502
let pathspec = {
502
503
let mut include = gix:: path:: to_unix_separators_on_windows ( gix:: path:: into_bstr (
You can’t perform that action at this time.
0 commit comments