Fix some missing branch constraints in package-versions-for-branch

The lack of these meant that versions on other branches could appear in the
results.
This commit is contained in:
Christopher Baines 2019-10-17 21:24:48 +01:00
parent 818be2ed98
commit b36294da4a

View file

@ -229,6 +229,8 @@ INNER JOIN git_branches AS last_git_branches
WHERE package_name = $1
AND package_versions_by_guix_revision_range.git_repository_id = $2
AND package_versions_by_guix_revision_range.branch_name = $3
AND first_git_branches.name = $3
AND last_git_branches.name = $3
ORDER BY first_datetime DESC, package_version DESC"
(list package-name
(number->string git-repository-id)