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:
authorMartin Koegler <mkoegler@auto.tuwien.ac.at>2008-02-18 10:31:55 +0300
committerJunio C Hamano <gitster@pobox.com>2008-02-18 10:49:33 +0300
commit24e8a3c946d158c977b67c346c21abc609c63209 (patch)
tree7c017f52081e2f6835f7b5661d8be90c8a52d85a /tag.c
parentaffeef12fb2d10317fbcc7a866fbc3603cf16119 (diff)
deref_tag: handle tag->tagged = NULL
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tag.c')
-rw-r--r--tag.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tag.c b/tag.c
index 38bf9134f9..990134fe7a 100644
--- a/tag.c
+++ b/tag.c
@@ -9,7 +9,10 @@ const char *tag_type = "tag";
struct object *deref_tag(struct object *o, const char *warn, int warnlen)
{
while (o && o->type == OBJ_TAG)
- o = parse_object(((struct tag *)o)->tagged->sha1);
+ if (((struct tag *)o)->tagged)
+ o = parse_object(((struct tag *)o)->tagged->sha1);
+ else
+ o = NULL;
if (!o && warn) {
if (!warnlen)
warnlen = strlen(warn);