aboutsummaryrefslogtreecommitdiffstats
path: root/parsing.c
diff options
context:
space:
mode:
Diffstat (limited to 'parsing.c')
-rw-r--r--parsing.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/parsing.c b/parsing.c
index 1013dad..332d61c 100644
--- a/parsing.c
+++ b/parsing.c
@@ -201,13 +201,13 @@ struct commitinfo *cgit_parse_commit(struct commit *commit)
201struct taginfo *cgit_parse_tag(struct tag *tag) 201struct taginfo *cgit_parse_tag(struct tag *tag)
202{ 202{
203 void *data; 203 void *data;
204 char type[20]; 204 enum object_type type;
205 unsigned long size; 205 unsigned long size;
206 char *p, *t; 206 char *p, *t;
207 struct taginfo *ret; 207 struct taginfo *ret;
208 208
209 data = read_sha1_file(tag->object.sha1, type, &size); 209 data = read_sha1_file(tag->object.sha1, &type, &size);
210 if (!data || strcmp(type, tag_type)) { 210 if (!data || type != OBJ_TAG) {
211 free(data); 211 free(data);
212 return 0; 212 return 0;
213 } 213 }