Re: [PATCH] tag: support --sort=version

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 21, 2014 at 3:43 AM, Jeff King <peff@xxxxxxxx> wrote:
> I think I actually prefer the full word "version", as you have already.
> It's clear what it means, and we can extend the syntax generally to:

Agreed. It's hard to find a letter that reminds you about "version".

>
>   --sort=[-][comparison:]field
>
> like:
>
>   --sort=-version:subject
>
> for descending version-sort by subject.  And then as a special-case
> convenience, make "version" without a field default to
> "version:refname". There's no ambiguity because the set of comparison
> names and field-names is fixed, and we know there is no overlap.
>
> If want to, we can _also_ give a one-letter abbreviation to the
> comparison field, like:
>
>   --sort=v:subject
>
> but that is not necessary.

Why not reversed order? So its syntax could be

[ "-" ] FIELD [ ":" [ "version" | "v" ] ]

It fits better to current f-e-r syntax where modifiers are after the
colon. And it avoids the possibility that someone adds field "version"
and we can't tell what "version" is what.
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]