gitweb: Add git_get_{following,preceding}_references functions
Adds git_get_following_references function, based on code which was
used in git_commitdiff_plain to generate X-Git-Tag: header,
and companion git_get_preceding_references function.
Both functions return array of all references of given type (as
returned by git_get_references) following/preceding given commit in
array (list) context, and last following/first preceding ref in scalar
context.
Stripping ref (list of refs) of "$type/" (e.g. "tags/") is left to
caller.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>