X-Git-Url: https://git.cameronkatri.com/cgit.git/blobdiff_plain/45c87ca1c32dcd5ffd4a681fadf05627d9ce7770..77b6f833441dda1dd50f5a51a81036b1fde815d5:/parsing.c diff --git a/parsing.c b/parsing.c index 9dacb16..12453c2 100644 --- a/parsing.c +++ b/parsing.c @@ -20,10 +20,10 @@ void cgit_parse_url(const char *url) char *c, *cmd, *p; struct cgit_repo *repo; - ctx.repo = NULL; if (!url || url[0] == '\0') return; + ctx.qry.page = NULL; ctx.repo = cgit_get_repoinfo(url); if (ctx.repo) { ctx.qry.repo = ctx.repo->url; @@ -53,7 +53,6 @@ void cgit_parse_url(const char *url) } if (cmd[1]) ctx.qry.page = xstrdup(cmd + 1); - return; } } @@ -201,7 +200,7 @@ struct taginfo *cgit_parse_tag(struct tag *tag) const char *p; struct taginfo *ret = NULL; - data = read_sha1_file(tag->object.oid.hash, &type, &size); + data = read_object_file(&tag->object.oid, &type, &size); if (!data || type != OBJ_TAG) goto cleanup;