![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
Public Member Functions | |
| void | readPackDirOnlyOnce () |
| GitRepoImpl (std::filesystem::path _path, Options _options) | |
| operator git_repository * () | |
| void | flush () override |
| std::unique_ptr< merkle::DirectorySinkWithFinalize > | makeDirectorySink () override |
| std::unique_ptr< merkle::RegularFileSinkWithFinalize > | makeRegularFileSink () 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, 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 |
| 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) |
| Static Public Member Functions inherited from nix::GitRepo | |
| static ref< GitRepo > | openRepo (const std::filesystem::path &path, Options options) |
| static WorkdirInfo | getCachedWorkdirInfo (const std::filesystem::path &path) |
| static void | invalidateWorkdirInfoCache () |
Public Attributes | |
| std::filesystem::path | path |
| Options | options |
| Repository | repo |
| git_odb_backend * | mempackBackend = nullptr |
| git_odb_backend * | packBackend = nullptr |
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.
|
inlineoverridevirtual |
Implements nix::GitRepo.
|
inlineoverridevirtual |
Implements nix::GitRepo.
|
overridevirtual |
Implements nix::GitRepo.
|
overridevirtual |
Implements nix::GitRepo.
|
inlineoverridevirtual |
Implements nix::GitRepo.
| ref< GitSourceAccessor > nix::GitRepoImpl::getRawAccessor | ( | const Hash & | rev, |
| const GitAccessorOptions & | options ) |
A 'GitSourceAccessor' with no regard for export-ignore.
|
overridevirtual |
Return the submodules of this repo at the indicated revision, along with the revision of each submodule.
Implements nix::GitRepo.
|
inlineoverridevirtual |
Implements nix::GitRepo.
|
inlineoverridevirtual |
Implements nix::GitRepo.
|
inlineoverridevirtual |
Implements nix::GitRepo.
|
inlineoverridevirtual |
Implements nix::GitRepo.
|
overridevirtual |
Implements nix::GitRepo.
|
overridevirtual |
Implements nix::GitRepo.
|
inline |
Read the pack directory only the once, when this repo was created (git_odb_backend_pack does that), rather than re-scanning it whenever an object is not found — which costs about six syscalls per miss.
Done by nulling out the backend's refresh callback; the vtable is semi-public interface in libgit2.
|
inlineoverridevirtual |
Implements nix::GitRepo.
|
inlineoverridevirtual |
Implements nix::GitRepo.
|
inlineoverridevirtual |
Implements nix::GitRepo.
|
inlineoverridevirtual |
Given a Git tree hash, compute the hash of its NAR serialisation. This is memoised on-disk.
Implements nix::GitRepo.
|
inlineoverridevirtual |
Verify that commit rev is signed by one of the keys in publicKeys. Throw an error if it isn't.
Implements nix::GitRepo.
| git_odb_backend* nix::GitRepoImpl::mempackBackend = nullptr |
In-memory object store for efficient batched writing to packfiles. Owned by repo.
| git_odb_backend* nix::GitRepoImpl::packBackend = nullptr |
On-disk packfile object store. Owned by repo.
| std::filesystem::path nix::GitRepoImpl::path |
Location of the repository on disk.
| 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 flush() on the various merkle file interfaces.