summaryrefslogtreecommitdiff
path: root/sha1_name.c
diff options
context:
space:
mode:
authorMartin Koegler <mkoegler@auto.tuwien.ac.at>2008-02-18 08:31:54 +0100
committerJunio C Hamano <gitster@pobox.com>2008-02-17 23:46:55 -0800
commitaffeef12fb2d10317fbcc7a866fbc3603cf16119 (patch)
tree61ce1a23d8259dc7f90778c7a0fd1b8898a7aa50 /sha1_name.c
parent9886ea417b7da9722c95630b5980ac174e04c71c (diff)
downloadgit-affeef12fb2d10317fbcc7a866fbc3603cf16119.tar.gz
deref_tag: handle return value NULL
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1_name.c')
-rw-r--r--sha1_name.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sha1_name.c b/sha1_name.c
index be8489e4e5..ed3c867d6a 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -578,8 +578,11 @@ static int handle_one_ref(const char *path,
struct object *object = parse_object(sha1);
if (!object)
return 0;
- if (object->type == OBJ_TAG)
+ if (object->type == OBJ_TAG) {
object = deref_tag(object, path, strlen(path));
+ if (!object)
+ return 0;
+ }
if (object->type != OBJ_COMMIT)
return 0;
insert_by_date((struct commit *)object, list);