author | Lars Hjemli <hjemli@gmail.com> | 2007-05-15 22:14:51 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-05-15 22:16:00 (UTC) |
commit | b28b105ec172b258ae5d629381a5890697c2f938 (patch) (unidiff) | |
tree | 0673dc5ed94c8ce99c714d1204b6582f9ba96fc5 /cgit.h | |
parent | 47a81c77fdd017227632c4df9a0b7b135b8a738d (diff) | |
download | cgit-b28b105ec172b258ae5d629381a5890697c2f938.zip cgit-b28b105ec172b258ae5d629381a5890697c2f938.tar.gz cgit-b28b105ec172b258ae5d629381a5890697c2f938.tar.bz2 |
Enable default value for head parameter
Pages which expect head to be specified in the querystring can now be
given a default value, configurable per repository (via repo.defbranch,
which defaults to "master").
Currently, only the log page actually works without parameters, but the
defbranch is bound to be exploited.
This also removes some dead code from shared.c
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | cgit.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -14,48 +14,49 @@ | |||
14 | #include <refs.h> | 14 | #include <refs.h> |
15 | #include <revision.h> | 15 | #include <revision.h> |
16 | #include <log-tree.h> | 16 | #include <log-tree.h> |
17 | #include <archive.h> | 17 | #include <archive.h> |
18 | #include <xdiff/xdiff.h> | 18 | #include <xdiff/xdiff.h> |
19 | 19 | ||
20 | 20 | ||
21 | typedef void (*configfn)(const char *name, const char *value); | 21 | typedef void (*configfn)(const char *name, const char *value); |
22 | typedef void (*filepair_fn)(struct diff_filepair *pair); | 22 | typedef void (*filepair_fn)(struct diff_filepair *pair); |
23 | typedef void (*linediff_fn)(char *line, int len); | 23 | typedef void (*linediff_fn)(char *line, int len); |
24 | 24 | ||
25 | struct cacheitem { | 25 | struct cacheitem { |
26 | char *name; | 26 | char *name; |
27 | struct stat st; | 27 | struct stat st; |
28 | int ttl; | 28 | int ttl; |
29 | int fd; | 29 | int fd; |
30 | }; | 30 | }; |
31 | 31 | ||
32 | struct repoinfo { | 32 | struct repoinfo { |
33 | char *url; | 33 | char *url; |
34 | char *name; | 34 | char *name; |
35 | char *path; | 35 | char *path; |
36 | char *desc; | 36 | char *desc; |
37 | char *owner; | 37 | char *owner; |
38 | char *defbranch; | ||
38 | char *module_link; | 39 | char *module_link; |
39 | int snapshots; | 40 | int snapshots; |
40 | }; | 41 | }; |
41 | 42 | ||
42 | struct repolist { | 43 | struct repolist { |
43 | int length; | 44 | int length; |
44 | int count; | 45 | int count; |
45 | struct repoinfo *repos; | 46 | struct repoinfo *repos; |
46 | }; | 47 | }; |
47 | 48 | ||
48 | struct commitinfo { | 49 | struct commitinfo { |
49 | struct commit *commit; | 50 | struct commit *commit; |
50 | char *author; | 51 | char *author; |
51 | char *author_email; | 52 | char *author_email; |
52 | unsigned long author_date; | 53 | unsigned long author_date; |
53 | char *committer; | 54 | char *committer; |
54 | char *committer_email; | 55 | char *committer_email; |
55 | unsigned long committer_date; | 56 | unsigned long committer_date; |
56 | char *subject; | 57 | char *subject; |
57 | char *msg; | 58 | char *msg; |
58 | }; | 59 | }; |
59 | 60 | ||
60 | struct taginfo { | 61 | struct taginfo { |
61 | char *tagger; | 62 | char *tagger; |