From: Karthik Nayak Date: Fri, 11 Sep 2015 15:04:16 +0000 (+0530) Subject: ref-filter: add support for %(contents:lines=X) X-Git-Tag: v2.7.0-rc0~137^2~6 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/1bb38e5a6a8fb6cf9b882a1a7038d649ceba0085?ds=inline;hp=1bb38e5a6a8fb6cf9b882a1a7038d649ceba0085 ref-filter: add support for %(contents:lines=X) In 'tag.c' we can print N lines from the annotation of the tag using the '-n' option. Copy code from 'tag.c' to 'ref-filter' and modify it to support appending of N lines from the annotation of tags to the given strbuf. Implement %(contents:lines=X) where X lines of the given object are obtained. While we're at it, remove unused "contents:" atoms from the `valid_atom` array. Add documentation and test for the same. Mentored-by: Christian Couder Mentored-by: Matthieu Moy Signed-off-by: Karthik Nayak Signed-off-by: Junio C Hamano ---