summaryrefslogtreecommitdiffabout
path: root/cgit.h
authorLars Hjemli <hjemli@gmail.com>2007-05-15 22:14:51 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2007-05-15 22:16:00 (UTC)
commitb28b105ec172b258ae5d629381a5890697c2f938 (patch) (unidiff)
tree0673dc5ed94c8ce99c714d1204b6582f9ba96fc5 /cgit.h
parent47a81c77fdd017227632c4df9a0b7b135b8a738d (diff)
downloadcgit-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>
Diffstat (limited to 'cgit.h') (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/cgit.h b/cgit.h
index f5906ad..ac710a6 100644
--- a/cgit.h
+++ b/cgit.h
@@ -1,85 +1,86 @@
1#ifndef CGIT_H 1#ifndef CGIT_H
2#define CGIT_H 2#define CGIT_H
3 3
4 4
5#include <git-compat-util.h> 5#include <git-compat-util.h>
6#include <cache.h> 6#include <cache.h>
7#include <grep.h> 7#include <grep.h>
8#include <object.h> 8#include <object.h>
9#include <tree.h> 9#include <tree.h>
10#include <commit.h> 10#include <commit.h>
11#include <tag.h> 11#include <tag.h>
12#include <diff.h> 12#include <diff.h>
13#include <diffcore.h> 13#include <diffcore.h>
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
21typedef void (*configfn)(const char *name, const char *value); 21typedef void (*configfn)(const char *name, const char *value);
22typedef void (*filepair_fn)(struct diff_filepair *pair); 22typedef void (*filepair_fn)(struct diff_filepair *pair);
23typedef void (*linediff_fn)(char *line, int len); 23typedef void (*linediff_fn)(char *line, int len);
24 24
25struct cacheitem { 25struct 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
32struct repoinfo { 32struct 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
42struct repolist { 43struct 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
48struct commitinfo { 49struct 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
60struct taginfo { 61struct taginfo {
61 char *tagger; 62 char *tagger;
62 char *tagger_email; 63 char *tagger_email;
63 int tagger_date; 64 int tagger_date;
64 char *msg; 65 char *msg;
65}; 66};
66 67
67extern const char cgit_version[]; 68extern const char cgit_version[];
68 69
69extern struct repolist cgit_repolist; 70extern struct repolist cgit_repolist;
70extern struct repoinfo *cgit_repo; 71extern struct repoinfo *cgit_repo;
71 72
72extern char *cgit_root_title; 73extern char *cgit_root_title;
73extern char *cgit_css; 74extern char *cgit_css;
74extern char *cgit_logo; 75extern char *cgit_logo;
75extern char *cgit_logo_link; 76extern char *cgit_logo_link;
76extern char *cgit_module_link; 77extern char *cgit_module_link;
77extern char *cgit_virtual_root; 78extern char *cgit_virtual_root;
78extern char *cgit_script_name; 79extern char *cgit_script_name;
79extern char *cgit_cache_root; 80extern char *cgit_cache_root;
80 81
81extern int cgit_nocache; 82extern int cgit_nocache;
82extern int cgit_snapshots; 83extern int cgit_snapshots;
83extern int cgit_max_lock_attempts; 84extern int cgit_max_lock_attempts;
84extern int cgit_cache_root_ttl; 85extern int cgit_cache_root_ttl;
85extern int cgit_cache_repo_ttl; 86extern int cgit_cache_repo_ttl;