|
| 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< GitSourceAccessor > | getRawAccessor (const Hash &rev) |
|
ref< SourceAccessor > | getAccessor (const Hash &rev, bool exportIgnore, std::string displayPrefix) 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 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) |
|
static ref< GitRepo > | openRepo (const std::filesystem::path &path, bool create=false, bool bare=false) |
|
static WorkdirInfo | getCachedWorkdirInfo (const std::filesystem::path &path) |
|
◆ dereferenceSingletonDirectory()
Hash nix::GitRepoImpl::dereferenceSingletonDirectory |
( |
const Hash & | oid | ) |
|
|
inlineoverridevirtual |
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.
Implements nix::GitRepo.
◆ fetch()
void nix::GitRepoImpl::fetch |
( |
const std::string & | url, |
|
|
const std::string & | refspec, |
|
|
bool | shallow ) |
|
inlineoverridevirtual |
◆ flush()
void nix::GitRepoImpl::flush |
( |
| ) |
|
|
inlineoverridevirtual |
◆ getAccessor() [1/2]
ref< SourceAccessor > nix::GitRepoImpl::getAccessor |
( |
const Hash & | rev, |
|
|
bool | exportIgnore, |
|
|
std::string | displayPrefix ) |
|
overridevirtual |
◆ getAccessor() [2/2]
◆ getFileSystemObjectSink()
◆ getLastModified()
uint64_t nix::GitRepoImpl::getLastModified |
( |
const Hash & | rev | ) |
|
|
inlineoverridevirtual |
◆ getRawAccessor()
◆ getRevCount()
uint64_t nix::GitRepoImpl::getRevCount |
( |
const Hash & | rev | ) |
|
|
inlineoverridevirtual |
◆ getSubmodules()
Return the submodules of this repo at the indicated revision, along with the revision of each submodule.
Implements nix::GitRepo.
◆ getWorkdirInfo()
◆ getWorkdirRef()
std::optional< std::string > nix::GitRepoImpl::getWorkdirRef |
( |
| ) |
|
|
inlineoverridevirtual |
◆ hasObject()
bool nix::GitRepoImpl::hasObject |
( |
const Hash & | oid_ | ) |
|
|
inlineoverridevirtual |
◆ isShallow()
bool nix::GitRepoImpl::isShallow |
( |
| ) |
|
|
inlineoverridevirtual |
◆ resolveRef()
Hash nix::GitRepoImpl::resolveRef |
( |
std::string | ref | ) |
|
|
inlineoverridevirtual |
◆ resolveSubmoduleUrl()
std::string nix::GitRepoImpl::resolveSubmoduleUrl |
( |
const std::string & | url | ) |
|
|
inlineoverridevirtual |
◆ setRemote()
void nix::GitRepoImpl::setRemote |
( |
const std::string & | name, |
|
|
const std::string & | url ) |
|
inlineoverridevirtual |
◆ treeHashToNarHash()
Hash nix::GitRepoImpl::treeHashToNarHash |
( |
const Hash & | treeHash | ) |
|
|
inlineoverridevirtual |
Given a Git tree hash, compute the hash of its NAR serialisation. This is memoised on-disk.
Implements nix::GitRepo.
◆ verifyCommit()
Verify that commit rev
is signed by one of the keys in publicKeys
. Throw an error if it isn't.
Implements nix::GitRepo.
◆ 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:
- /home/buildozer/aports/community/nix/src/nix-2.26.3/src/libfetchers/git-utils.cc