Class R10K::Git::WorkingDir
In: lib/r10k/git/working_dir.rb
Parent: R10K::Git::Repository

Implements sparse git repositories with shared objects

Working directory instances use the git alternatives object store, so that working directories only contain checked out files and all object files are shared.

@deprecated This has been replaced by the ShellGit provider and the

  StatefulRepository class and will be removed in 2.0.0

:nocov:

Methods

checkout   cloned?   current   exist?   git?   new   outdated?   resolve_remote_head   sync   update  

Included Modules

R10K::Logging

Attributes

cache  [R]  @!attribute [r] cache
  @return [R10K::Git::Cache] The object cache backing this working directory
ref  [R]  @!attribute [r] ref
  @return [R10K::Git::Ref] The git reference to use check out in the given directory
remote  [R]  @!attribute [r] remote
  @return [String] The actual remote used as an upstream for this module.

Public Class methods

Create a new shallow git working directory

@param ref [String, R10K::Git::Ref] @param remote [String] @param basedir [String] @param dirname [String]

Public Instance methods

check out the given ref

@param ref [R10K::Git::Ref] The git reference to check out

Determine if repo has been cloned into a specific dir

@return [true, false] If the repo has already been cloned

The currently checked out HEAD

@return [R10k::Git::Head]

Does a directory exist where we expect a working dir to be? @return [true, false]

git?()

Alias for cloned?

Prefer remote heads from the ‘cache’ remote over the real remote

Synchronize the local git repository.

[Validate]