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
diff options
context:
space:
mode:
authorMartin Koegler <mkoegler@auto.tuwien.ac.at>2008-02-18 10:31:54 +0300
committerJunio C Hamano <gitster@pobox.com>2008-02-18 10:46:55 +0300
commitaffeef12fb2d10317fbcc7a866fbc3603cf16119 (patch)
tree61ce1a23d8259dc7f90778c7a0fd1b8898a7aa50 /sha1_name.c
parent9886ea417b7da9722c95630b5980ac174e04c71c (diff)
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);