tools: add helper function to find the git commit

This commit is contained in:
Rodrigo Arias 2021-03-31 16:38:09 +02:00
parent a4752603e9
commit 600e1b9987

View File

@ -85,6 +85,11 @@ let
in in
toInt front; toInt front;
# Returns the given gitCommit if not null, or the one stored in the
# gitTable for the branch gitBranch.
findCommit = {gitCommit ? null, gitTable, gitBranch}:
if (gitCommit != null) then gitCommit else gitTable."${gitBranch}";
}; };
in in
gen gen