aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorKarthik Nayak <karthik.188@gmail.com>2015-07-07 21:36:09 +0530
committerJunio C Hamano <gitster@pobox.com>2015-08-03 10:25:27 -0700
commit68411046b5067de9c378d1f58313f2fae288286c (patch)
tree625308ce887099864250cfd7f6bc9855653fbbda /builtin
parentb2172fdf702426cb4eba093b5504d0a0e9e59746 (diff)
downloadgit-68411046b5067de9c378d1f58313f2fae288286c.tar.gz
git-68411046b5067de9c378d1f58313f2fae288286c.tar.xz
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 <peff@peff.net> 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>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/tag.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin/tag.c b/builtin/tag.c
index e36c43ec4..280981f57 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)
{