From 0c940ac57cc521b81f7691cd8cec39de6e45f8aa Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 13 Nov 2015 16:08:15 +0200 Subject: Update pkg-status command documentation --- bpkg/pkg-status.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'bpkg/pkg-status.cxx') diff --git a/bpkg/pkg-status.cxx b/bpkg/pkg-status.cxx index c31e834..f83b610 100644 --- a/bpkg/pkg-status.cxx +++ b/bpkg/pkg-status.cxx @@ -66,17 +66,17 @@ namespace bpkg query q (query::id.name == n); - // If we found an existing package, then only look for versions - // greater than what already exists. + // If the user specified the version, then only look for that + // specific version. // - if (p != nullptr) - q = q && query::id.version > p->version; - else if (!v.empty ()) - // - // Otherwise, if the user specified the version, then only look for - // that specific version. - // + if (!v.empty ()) q = q && query::id.version == v; + // + // Otherwise, if we found an existing package, then only look for + // versions greater than what already exists. + // + else if (p != nullptr) + q = q && query::id.version > p->version; q += order_by_version_desc (query::id.version); -- cgit v1.1