Skip to content
  • Jeff King's avatar
    ref-filter: provide a function for parsing sort options · 18a25650
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    The ref-filter module currently provides a callback suitable
    for parsing command-line --sort options. But since git-tag
    also supports the tag.sort config option, it needs a
    function whose implementation is quite similar, but with a
    slightly different interface. The end result is that
    builtin/tag.c has a copy-paste of parse_opt_ref_sorting().
    
    Instead, let's provide a function to parse an arbitrary
    sort string, which we can then trivially wrap to make the
    parse_opt variant.
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    18a25650