aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr
diff options
context:
space:
mode:
authorThéophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>2023-06-24 14:55:31 +0200
committerGitHub <noreply@github.com>2023-06-24 14:55:31 +0200
commit60f06a1714a74bf144eb9ccad9643578248bdfc4 (patch)
tree5f2c4badd53cd83e2ca027832a992d0e81a8ca6e /src/libexpr
parentfd4f03b8fdcb0f33552730c786139019e29f5dbe (diff)
parenta7b49086c76bc181ab1cf1d3c7fba44b06d2f1dd (diff)
Merge pull request #5385 from Enzime/add/dirty-rev
Add `dirtyRev` and `dirtyShortRev` to `fetchGit`
Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/primops/fetchTree.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libexpr/primops/fetchTree.cc b/src/libexpr/primops/fetchTree.cc
index 1d23ef53b..579a45f92 100644
--- a/src/libexpr/primops/fetchTree.cc
+++ b/src/libexpr/primops/fetchTree.cc
@@ -22,7 +22,7 @@ void emitTreeAttrs(
{
assert(input.isLocked());
- auto attrs = state.buildBindings(8);
+ auto attrs = state.buildBindings(10);
state.mkStorePathString(tree.storePath, attrs.alloc(state.sOutPath));
@@ -56,6 +56,11 @@ void emitTreeAttrs(
}
+ if (auto dirtyRev = fetchers::maybeGetStrAttr(input.attrs, "dirtyRev")) {
+ attrs.alloc("dirtyRev").mkString(*dirtyRev);
+ attrs.alloc("dirtyShortRev").mkString(*fetchers::maybeGetStrAttr(input.attrs, "dirtyShortRev"));
+ }
+
if (auto lastModified = input.getLastModified()) {
attrs.alloc("lastModified").mkInt(*lastModified);
attrs.alloc("lastModifiedDate").mkString(