Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tag.c
diff options
context:
space:
mode:
Diffstat (limited to 'tag.c')
-rw-r--r--tag.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tag.c b/tag.c
index 2b25fc0e1d..b1ab75ff01 100644
--- a/tag.c
+++ b/tag.c
@@ -3,6 +3,13 @@
const char *tag_type = "tag";
+struct object *deref_tag(struct object *o)
+{
+ while (o && o->type == tag_type)
+ o = parse_object(((struct tag *)o)->tagged->sha1);
+ return o;
+}
+
struct tag *lookup_tag(const unsigned char *sha1)
{
struct object *obj = lookup_object(sha1);