From: Karthik Nayak Date: Fri, 11 Sep 2015 15:06:16 +0000 (+0530) Subject: tag.c: use 'ref-filter' APIs X-Git-Tag: v2.7.0-rc0~137^2~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/b7cc53e92c806b73e14b03f60c17b7c29e52b4a4?ds=inline;hp=b7cc53e92c806b73e14b03f60c17b7c29e52b4a4 tag.c: use 'ref-filter' APIs 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: Christian Couder Mentored-by: Matthieu Moy Signed-off-by: Karthik Nayak Signed-off-by: Junio C Hamano ---