• K
    tag.c: use 'ref-filter' APIs · b7cc53e9
    Karthik Nayak 提交于
    Make 'tag.c' use 'ref-filter' APIs for iterating through refs, sorting
    and printing of refs. This removes most of the code used in 'tag.c'
    replacing it with calls to the 'ref-filter' library.
    
    Make 'tag.c' use the 'filter_refs()' function provided by 'ref-filter'
    to filter out tags based on the options set.
    
    For printing tags we use 'show_ref_array_item()' function provided by
    'ref-filter'.
    
    We improve the sorting option provided by 'tag.c' by using the sorting
    options provided by 'ref-filter'. This causes the test 'invalid sort
    parameter on command line' in t7004 to fail, as 'ref-filter' throws an
    error for all sorting fields which are incorrect. The test is changed
    to reflect the same.
    
    Modify documentation for the same.
    Mentored-by: NChristian Couder <christian.couder@gmail.com>
    Mentored-by: NMatthieu Moy <matthieu.moy@grenoble-inp.fr>
    Signed-off-by: NKarthik Nayak <karthik.188@gmail.com>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    b7cc53e9
t7004-tag.sh 39.6 KB