Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::GitRepo Struct Referenceabstract
Inheritance diagram for nix::GitRepo:
nix::GitRepoImpl

Classes

struct  Options
struct  Submodule
struct  WorkdirInfo

Public Member Functions

virtual uint64_t getLastModified (const Hash &rev)=0
virtual bool isShallow ()=0
virtual Hash resolveRef (std::string ref)=0
virtual void setRemote (const std::string &name, const std::string &url)=0
virtual WorkdirInfo getWorkdirInfo ()=0
virtual std::optional< std::string > getWorkdirRef ()=0
virtual std::vector< std::tuple< Submodule, Hash > > getSubmodules (const Hash &rev, bool exportIgnore)=0
virtual std::string resolveSubmoduleUrl (const std::string &url)=0
virtual bool hasObject (const Hash &oid)=0
virtual ref< SourceAccessor > getAccessor (const Hash &rev, const GitAccessorOptions &options, std::string displayPrefix)=0
virtual ref< SourceAccessor > getAccessor (const WorkdirInfo &wd, const GitAccessorOptions &options, MakeNotAllowedError makeNotAllowedError)=0
virtual void flush ()=0
virtual std::unique_ptr< merkle::DirectorySinkWithFinalize > makeDirectorySink ()=0
virtual std::unique_ptr< merkle::RegularFileSinkWithFinalize > makeRegularFileSink ()=0
virtual void fetch (const std::string &url, const std::string &refspec, bool shallow)=0
virtual void verifyCommit (const Hash &rev, const std::vector< fetchers::PublicKey > &publicKeys)=0
virtual Hash treeHashToNarHash (const fetchers::Settings &settings, const Hash &treeHash)=0
virtual Hash dereferenceSingletonDirectory (const Hash &oid)=0

Static Public Member Functions

static ref< GitRepo > openRepo (const std::filesystem::path &path, Options options)
static WorkdirInfo getCachedWorkdirInfo (const std::filesystem::path &path)
static void invalidateWorkdirInfoCache ()

Member Function Documentation

◆ dereferenceSingletonDirectory()

virtual Hash nix::GitRepo::dereferenceSingletonDirectory ( const Hash & oid)
pure virtual

If the specified Git object is a directory with a single entry that is a directory, return the ID of that object. Otherwise, return the passed ID unchanged.

Implemented in nix::GitRepoImpl.

◆ getSubmodules()

virtual std::vector< std::tuple< Submodule, Hash > > nix::GitRepo::getSubmodules ( const Hash & rev,
bool exportIgnore )
pure virtual

Return the submodules of this repo at the indicated revision, along with the revision of each submodule.

Implemented in nix::GitRepoImpl.

◆ treeHashToNarHash()

virtual Hash nix::GitRepo::treeHashToNarHash ( const fetchers::Settings & settings,
const Hash & treeHash )
pure virtual

Given a Git tree hash, compute the hash of its NAR serialisation. This is memoised on-disk.

Implemented in nix::GitRepoImpl.

◆ verifyCommit()

virtual void nix::GitRepo::verifyCommit ( const Hash & rev,
const std::vector< fetchers::PublicKey > & publicKeys )
pure virtual

Verify that commit rev is signed by one of the keys in publicKeys. Throw an error if it isn't.

Implemented in nix::GitRepoImpl.


The documentation for this struct was generated from the following files:
  • libfetchers/include/nix/fetchers/git-utils.hh
  • libfetchers/git-utils.cc