I encountered this error when building docs using cargo doc for my project. I did some digging. and managed to locate where the error originated: in config::Cache::excludes_file() it calls self.trusted_file_path() to get the path for the EXCLUDES_FILE:
https://github.com/Byron/gitoxide/blob/d3588ca4fe0364c88e42cdac24ceae548355d99d/gix/src/config/cache/access.rs#L208-L212
in trusted_file_path(), self.resvoled.path_fillter(...) returns a value of Some("") (it's actual type is Path not &str but you get the point) which cause path.interpolate(ctx) to return an Err(interpolate::Error):
https://github.com/Byron/gitoxide/blob/d3588ca4fe0364c88e42cdac24ceae548355d99d/gix/src/config/cache/access.rs#L222-L232
it turns out in my git config file, there exists an entry for core.excludesfile, but it's value is blank:
I don't remember how it came to be, I think this might be a leftover by the SourceTree GUI app.
and I'm not sure if this is expected behavior or misbehavior, but apparently libgit2 didn't treat this as an error case.
I guess another way to state question is, should path_filter() return Some("") or should it return None for an blank path?
I encountered this error when building docs using
cargo docfor my project. I did some digging. and managed to locate where the error originated: inconfig::Cache::excludes_file()it callsself.trusted_file_path()to get the path for the EXCLUDES_FILE:https://github.com/Byron/gitoxide/blob/d3588ca4fe0364c88e42cdac24ceae548355d99d/gix/src/config/cache/access.rs#L208-L212
in
trusted_file_path(),self.resvoled.path_fillter(...)returns a value ofSome("")(it's actual type isPathnot&strbut you get the point) which causepath.interpolate(ctx)to return anErr(interpolate::Error):https://github.com/Byron/gitoxide/blob/d3588ca4fe0364c88e42cdac24ceae548355d99d/gix/src/config/cache/access.rs#L222-L232
it turns out in my git config file, there exists an entry for
core.excludesfile, but it's value is blank:I don't remember how it came to be, I think this might be a leftover by the SourceTree GUI app.
and I'm not sure if this is expected behavior or misbehavior, but apparently
libgit2didn't treat this as an error case.I guess another way to state question is, should
path_filter()returnSome("")or should it returnNonefor an blank path?