Nix 2.26.3
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  Submodule
 
struct  WorkdirInfo
 

Public Member Functions

virtual uint64_t getRevCount (const Hash &rev)=0
 
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< SourceAccessorgetAccessor (const Hash &rev, bool exportIgnore, std::string displayPrefix)=0
 
virtual ref< SourceAccessorgetAccessor (const WorkdirInfo &wd, bool exportIgnore, MakeNotAllowedError makeNotAllowedError)=0
 
virtual ref< GitFileSystemObjectSinkgetFileSystemObjectSink ()=0
 
virtual void flush ()=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 Hash &treeHash)=0
 
virtual Hash dereferenceSingletonDirectory (const Hash &oid)=0
 

Static Public Member Functions

static ref< GitRepoopenRepo (const std::filesystem::path &path, bool create=false, bool bare=false)
 
static WorkdirInfo getCachedWorkdirInfo (const std::filesystem::path &path)
 

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 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: