blob: b1dc9f11373817ded456056dfc0dd80543d002d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * Readers that turn raw git object bodies and the incoming request URL into
 * the records cgit renders from. Commit and tag objects arrive as flat text,
 * so the work here is splitting off the headers and re-encoding the remaining
 * free text into the page encoding.
 */

#ifndef CGIT_PARSING_H
#define CGIT_PARSING_H

#include "cgit.h"

// Split a request url into the repository, the page and the path it names,
// storing them in ctx.qry.
extern void cgit_parse_url(const char *url);

extern struct commitinfo *cgit_parse_commit(struct commit *commit);
extern struct taginfo *cgit_parse_tag(struct tag *tag);

#endif // CGIT_PARSING_H