tools: add helper function to find the git commit
This commit is contained in:
parent
a4752603e9
commit
600e1b9987
@ -85,6 +85,11 @@ let
|
||||
in
|
||||
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
|
||||
gen
|
||||
|
Loading…
Reference in New Issue
Block a user