[][src]Module git_odb::alternate

A file with directories of other git object databases to use when reading objects.

This inherently makes alternates read-only.

An alternate file in <git-dir>/info/alternates can look as follows:

# a comment, empty lines are also allowed
# relative paths resolve relative to the parent git repository
../path/relative/to/repo/.git
/absolute/path/to/repo/.git

"/a/ansi-c-quoted/path/with/tabs\t/.git"

# each .git directory should indeed be a directory, and not a file

Based on the canonical implementation.

Modules

parse
unquote

Enums

Error

Returned by resolve()

Functions

resolve

Given an objects directory, try to resolve alternate object directories possibly located in the ./info/alternates file. If no alternate object database was resolved, the reesulting Vec is empty, and it is not an error if there are no alternates, or if there is a cycle while there is at least one valid alternate.