Fix select-guix-revision-for-branch-and-datetime

Flip the inequality and order, as this was picking the first revision after
the datetime, rather than the last revision before it, which was the
intention, as this should give you the revision on the branch, at the
datetime.
This commit is contained in:
Christopher Baines 2019-11-21 20:48:58 +00:00
parent ae150888d8
commit 75d5e4b9d5

View file

@ -72,8 +72,8 @@ FROM guix_revisions
INNER JOIN git_branches
ON git_branches.commit = guix_revisions.commit
AND git_branches.git_repository_id = guix_revisions.git_repository_id
WHERE git_branches.name = $1 AND git_branches.datetime >= $2
ORDER BY git_branches.datetime ASC
WHERE git_branches.name = $1 AND git_branches.datetime <= $2
ORDER BY git_branches.datetime DESC
LIMIT 1")
(car