aboutsummaryrefslogtreecommitdiff
path: root/libbrep/common.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbrep/common.hxx')
-rw-r--r--libbrep/common.hxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/libbrep/common.hxx b/libbrep/common.hxx
index 942790c..6bc5aca 100644
--- a/libbrep/common.hxx
+++ b/libbrep/common.hxx
@@ -318,10 +318,12 @@ namespace brep
template <typename T>
inline auto
- order_by_version_desc (const T& x) -> //decltype ("ORDER BY" + x.epoch)
- decltype (x.epoch == 0)
+ order_by_version_desc (
+ const T& x,
+ bool first = true) -> //decltype ("ORDER BY" + x.epoch)
+ decltype (x.epoch == 0)
{
- return "ORDER BY"
+ return (first ? "ORDER BY" : ", ")
+ x.epoch + "DESC,"
+ x.canonical_upstream + "DESC,"
+ x.canonical_release + "DESC,"