Skip to main content

lfs_alternate_dirs

Function lfs_alternate_dirs 

Source
pub fn lfs_alternate_dirs(cwd: &Path) -> Result<Vec<PathBuf>, Error>
Expand description

LFS-objects directories belonging to alternate object stores referenced by this repository. Used to satisfy a git lfs smudge or git lfs fetch from a git clone --shared <source> checkout without re-downloading bytes the source already has.

Sources, in order:

  1. GIT_ALTERNATE_OBJECT_DIRECTORIES env var (path-list separated).
  2. <git-dir>/objects/info/alternates — one object directory per line; blank lines and #-comments skipped.

Each entry names a git objects directory (e.g. /path/to/source/.git/objects); the matching LFS-objects directory lives next to it at <entry>/../lfs/objects. Only directories that actually exist are returned.