Function discover_optional
Source pub fn discover_optional(start: Option<&Path>) -> Result<Option<Repository>>
Expand description
Return Some(repo) when a repository can be discovered at start.
§Parameters
start - starting path for discovery; when None, uses current directory.
§Errors
Returns errors other than “not a repository” (for example I/O and path
canonicalization failures).