pub fn start_object_reader(
real_git: &Path,
global_prefix: &[OsString],
overlay: &[(OsString, OsString)],
) -> Result<ObjectReader, CandidateError>Expand description
What:
Start the reader for the repository the caller’s global options select.
&[OsString] borrows the arguments before the subcommand,
unchanged;
&[(OsString, OsString)] borrows added environment pairs.
Result<T, E> is “a value or a failure”.
Why:
Replaying the global prefix makes the reader open the same repository as the
forwarded command.
The overlay may point it at a private object directory,
so
one reader is bound to one overlay for its whole life.
In TS you’d write (pseudocode):
function startObjectReader(realGit, globalPrefix, overlay): ObjectReader;