path: root/builtin/tag.c
diff options
authorKarthik Nayak <>2015-07-07 16:06:09 (GMT)
committerJunio C Hamano <>2015-08-03 17:25:27 (GMT)
commit68411046b5067de9c378d1f58313f2fae288286c (patch)
tree625308ce887099864250cfd7f6bc9855653fbbda /builtin/tag.c
parentb2172fdf702426cb4eba093b5504d0a0e9e59746 (diff)
ref-filter: implement '--points-at' option
In 'tag -l' we have '--points-at' option which lets users list only tags of a given object. Implement this option in 'ref-filter.{c,h}' so that other commands can benefit from this. This is duplicated from tag.c, we will eventually remove that when we port tag.c to use ref-filter APIs. Based-on-patch-by: Jeff King <> Mentored-by: Christian Couder <> Mentored-by: Matthieu Moy <> Signed-off-by: Karthik Nayak <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin/tag.c')
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin/tag.c b/builtin/tag.c
index e36c43e..280981f 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -56,6 +56,10 @@ static int match_pattern(const char **patterns, const char *ref)
return 0;
+ * This is currently duplicated in ref-filter.c, and will eventually be
+ * removed as we port tag.c to use the ref-filter APIs.
+ */
static const unsigned char *match_points_at(const char *refname,
const unsigned char *sha1)