blob: c0bdebc0db5aa291d61082d9d1afb93abd3fe062 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
 * 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. Each record is freed beside the reader that
 * builds it.
 */

#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 string_list *cgit_mailmap(void);
extern struct commitinfo *cgit_parse_commit(struct commit *commit);
extern void cgit_free_commitinfo(struct commitinfo *info);
extern struct taginfo *cgit_parse_tag(struct tag *tag);
extern void cgit_free_taginfo(struct taginfo *info);

#endif // CGIT_PARSING_H