ref-filter: add option to filter out tags, branches and remotes
authorKarthik Nayak <karthik.188@gmail.com>
Thu, 10 Sep 2015 15:48:23 +0000 (21:18 +0530)
committerJunio C Hamano <gitster@pobox.com>
Thu, 17 Sep 2015 17:02:48 +0000 (10:02 -0700)
commit5b4f28510f36062134390ad8818721c1d4a2760f
tree20d7554e7eabaa2d6f20bc59acc081af6b9cfe05
parentce59208293f793ae822b5bfdf4040739f1c3ccb7
ref-filter: add option to filter out tags, branches and remotes

Add a function called 'for_each_fullref_in()' to refs.{c,h} which
iterates through each ref for the given path without trimming the path
and also accounting for broken refs, if mentioned.

Add 'filter_ref_kind()' in ref-filter.c to check the kind of ref being
handled and return the kind to 'ref_filter_handler()', where we
discard refs which we do not need and assign the kind to needed refs.

Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ref-filter.c
ref-filter.h
refs.c
refs.h