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< SourceAccessor > | getAccessor (const Hash &rev, bool exportIgnore, std::string displayPrefix)=0 |
virtual ref< SourceAccessor > | getAccessor (const WorkdirInfo &wd, bool exportIgnore, MakeNotAllowedError makeNotAllowedError)=0 |
virtual ref< GitFileSystemObjectSink > | getFileSystemObjectSink ()=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< GitRepo > | openRepo (const std::filesystem::path &path, bool create=false, bool bare=false) |
static WorkdirInfo | getCachedWorkdirInfo (const std::filesystem::path &path) |
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.
|
pure virtual |
Return the submodules of this repo at the indicated revision, along with the revision of each submodule.
Implemented in nix::GitRepoImpl.
Given a Git tree hash, compute the hash of its NAR serialisation. This is memoised on-disk.
Implemented in nix::GitRepoImpl.
|
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.