diff --git a/garlic/tools.nix b/garlic/tools.nix index db9c2a7..666f12e 100644 --- a/garlic/tools.nix +++ b/garlic/tools.nix @@ -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