Nix 2.34.6
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, Options _options)
 operator git_repository * ()
void flush () override
Pool< GitRepoImpl > getPool ()
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, const GitAccessorOptions &options)
ref< SourceAccessor > getAccessor (const Hash &rev, const GitAccessorOptions &options, std::string displayPrefix) override
ref< SourceAccessor > getAccessor (const WorkdirInfo &wd, const GitAccessorOptions &options, 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 fetchers::Settings &settings, 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)

Public Attributes

std::filesystem::path path
Options options
Repository repo
git_odb_backend * mempackBackend = nullptr
git_odb_backend * packBackend = nullptr

Member Function Documentation

◆ getPool()

Pool< GitRepoImpl > nix::GitRepoImpl::getPool ( )
inline

Return a connection pool for this repo. Useful for multithreaded access.

◆ getRawAccessor()

ref< GitSourceAccessor > nix::GitRepoImpl::getRawAccessor ( const Hash & rev,
const GitAccessorOptions & options )

A 'GitSourceAccessor' with no regard for export-ignore.

Member Data Documentation

◆ mempackBackend

git_odb_backend* nix::GitRepoImpl::mempackBackend = nullptr

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

◆ packBackend

git_odb_backend* nix::GitRepoImpl::packBackend = nullptr

On-disk packfile object store. 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:
  • /builddir/build/BUILD/nix-2.34.6-build/nix-2.34.6/src/libfetchers/git-utils.cc