1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 04:21:16 +02:00

Split tarball-specific logic from GitFileSystemObjectSink

This commit is contained in:
Eelco Dolstra 2024-07-29 14:26:25 +02:00
parent 5e83c0427f
commit e0012b97ab
5 changed files with 37 additions and 20 deletions

View file

@ -98,6 +98,17 @@ struct GitRepo
* serialisation. This is memoised on-disk.
*/
virtual Hash treeHashToNarHash(const Hash & treeHash) = 0;
/**
* If the specified Git object is a directory with a single entry
* that is a directory or a non-executable regular file, return
* the ID of that object.
*
* Note: We don't do this for executable files because they don't
* have a tree hash in the Git object model that distinguishes
* them from non-executable files.
*/
virtual Hash dereferenceSingletonDirectory(const Hash & oid) = 0;
};
ref<GitRepo> getTarballCache();