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

Public Member Functions

 GitRepoImpl (std::filesystem::path _path, bool create, bool bare)
 
 operator git_repository * ()
 
void flush () override
 
uint64_t getRevCount (const Hash &rev) override
 
uint64_t getLastModified (const Hash &rev) override
 
bool isShallow () override
 
void setRemote (const std::string &name, const std::string &url) override
 
Hash resolveRef (std::string ref) override
 
std::vector< Submodule > parseSubmodules (const std::filesystem::path &configFile)
 
WorkdirInfo getWorkdirInfo () override
 
std::optional< std::string > getWorkdirRef () override
 
std::vector< std::tuple< Submodule, Hash > > getSubmodules (const Hash &rev, bool exportIgnore) override
 
std::string resolveSubmoduleUrl (const std::string &url) override
 
bool hasObject (const Hash &oid_) override
 
ref< GitSourceAccessorgetRawAccessor (const Hash &rev, bool smudgeLfs=false)
 
ref< SourceAccessor > getAccessor (const Hash &rev, bool exportIgnore, std::string displayPrefix, bool smudgeLfs=false) override
 
ref< SourceAccessor > getAccessor (const WorkdirInfo &wd, bool exportIgnore, MakeNotAllowedError e) override
 
ref< GitFileSystemObjectSink > getFileSystemObjectSink () override
 
void fetch (const std::string &url, const std::string &refspec, bool shallow) override
 
void verifyCommit (const Hash &rev, const std::vector< fetchers::PublicKey > &publicKeys) override
 
Hash treeHashToNarHash (const Hash &treeHash) override
 
Hash dereferenceSingletonDirectory (const Hash &oid_) override
 

Static Public Member Functions

static int statusCallbackTrampoline (const char *path, unsigned int statusFlags, void *payload)
 
static int sidebandProgressCallback (const char *str, int len, void *payload)
 
static int transferProgressCallback (const git_indexer_progress *stats, void *payload)
 

Public Attributes

std::filesystem::path path
 
Repository repo
 
git_odb_backend * mempack_backend
 

Member Function Documentation

◆ getRawAccessor()

ref< GitSourceAccessor > nix::GitRepoImpl::getRawAccessor ( const Hash & rev,
bool smudgeLfs = false )

A 'GitSourceAccessor' with no regard for export-ignore or any other transformations.

Member Data Documentation

◆ mempack_backend

git_odb_backend* nix::GitRepoImpl::mempack_backend

In-memory object store for efficient batched writing to packfiles. Owned by repo.

◆ path

std::filesystem::path nix::GitRepoImpl::path

Location of the repository on disk.

◆ repo

Repository nix::GitRepoImpl::repo

libgit2 repository. Note that new objects are not written to disk, because we are using a mempack backend. For writing to disk, see flush(), which is also called by GitFileSystemObjectSink::sync().


The documentation for this struct was generated from the following file: