core.excludesFile
config entry exists but has blank value causes error: is this considered a bug or expected behavior?
#1370
Labels
acknowledged
an issue is accepted as shortcoming to be fixed
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: 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 isPath
not&str
but 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
libgit2
didn't treat this as an error case.I guess another way to state question is, should
path_filter()
returnSome("")
or should it returnNone
for an blank path?The text was updated successfully, but these errors were encountered: