aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/primops/fetchGit.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/primops/fetchGit.hh')
-rw-r--r--src/libexpr/primops/fetchGit.hh23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/libexpr/primops/fetchGit.hh b/src/libexpr/primops/fetchGit.hh
new file mode 100644
index 000000000..006fa8b5f
--- /dev/null
+++ b/src/libexpr/primops/fetchGit.hh
@@ -0,0 +1,23 @@
+#pragma once
+
+#include "store-api.hh"
+
+#include <regex>
+
+namespace nix {
+
+struct GitInfo
+{
+ Path storePath;
+ std::string ref;
+ Hash rev{htSHA1};
+ uint64_t revCount;
+ time_t lastModified;
+};
+
+GitInfo exportGit(ref<Store> store, std::string uri,
+ std::optional<std::string> ref,
+ std::optional<Hash> rev,
+ const std::string & name);
+
+}