author | Lars Hjemli <hjemli@gmail.com> | 2007-05-11 10:12:48 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-05-11 10:12:48 (UTC) |
commit | ded9393b173853d2e960f9b176aeb0bc4ed35be2 (patch) (unidiff) | |
tree | 5c062b21e85ef0fe243ad900e9f4ffaf2ded0f62 /cgit.h | |
parent | cc1dbd1b5d610bd5e626f54d310f11cf47684ea1 (diff) | |
download | cgit-ded9393b173853d2e960f9b176aeb0bc4ed35be2.zip cgit-ded9393b173853d2e960f9b176aeb0bc4ed35be2.tar.gz cgit-ded9393b173853d2e960f9b176aeb0bc4ed35be2.tar.bz2 |
Add submodule links in tree listing
When a submodule occurs in a tree, generate a link to show the
module/commit. The link is specified as a sprintf string in /etc/cgitrc,
using parameters 'module-link' and 'repo.module-link'. This should probably
be extended with repo.module-link.$path.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | cgit.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -12,85 +12,87 @@ | |||
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 | ||
21 | typedef void (*configfn)(const char *name, const char *value); | 21 | typedef void (*configfn)(const char *name, const char *value); |
22 | 22 | ||
23 | struct cacheitem { | 23 | struct cacheitem { |
24 | char *name; | 24 | char *name; |
25 | struct stat st; | 25 | struct stat st; |
26 | int ttl; | 26 | int ttl; |
27 | int fd; | 27 | int fd; |
28 | }; | 28 | }; |
29 | 29 | ||
30 | struct repoinfo { | 30 | struct repoinfo { |
31 | char *url; | 31 | char *url; |
32 | char *name; | 32 | char *name; |
33 | char *path; | 33 | char *path; |
34 | char *desc; | 34 | char *desc; |
35 | char *owner; | 35 | char *owner; |
36 | char *module_link; | ||
36 | int snapshots; | 37 | int snapshots; |
37 | }; | 38 | }; |
38 | 39 | ||
39 | struct repolist { | 40 | struct repolist { |
40 | int length; | 41 | int length; |
41 | int count; | 42 | int count; |
42 | struct repoinfo *repos; | 43 | struct repoinfo *repos; |
43 | }; | 44 | }; |
44 | 45 | ||
45 | struct commitinfo { | 46 | struct commitinfo { |
46 | struct commit *commit; | 47 | struct commit *commit; |
47 | char *author; | 48 | char *author; |
48 | char *author_email; | 49 | char *author_email; |
49 | unsigned long author_date; | 50 | unsigned long author_date; |
50 | char *committer; | 51 | char *committer; |
51 | char *committer_email; | 52 | char *committer_email; |
52 | unsigned long committer_date; | 53 | unsigned long committer_date; |
53 | char *subject; | 54 | char *subject; |
54 | char *msg; | 55 | char *msg; |
55 | }; | 56 | }; |
56 | 57 | ||
57 | struct taginfo { | 58 | struct taginfo { |
58 | char *tagger; | 59 | char *tagger; |
59 | char *tagger_email; | 60 | char *tagger_email; |
60 | int tagger_date; | 61 | int tagger_date; |
61 | char *msg; | 62 | char *msg; |
62 | }; | 63 | }; |
63 | 64 | ||
64 | extern const char cgit_version[]; | 65 | extern const char cgit_version[]; |
65 | 66 | ||
66 | extern struct repolist cgit_repolist; | 67 | extern struct repolist cgit_repolist; |
67 | extern struct repoinfo *cgit_repo; | 68 | extern struct repoinfo *cgit_repo; |
68 | 69 | ||
69 | extern char *cgit_root_title; | 70 | extern char *cgit_root_title; |
70 | extern char *cgit_css; | 71 | extern char *cgit_css; |
71 | extern char *cgit_logo; | 72 | extern char *cgit_logo; |
72 | extern char *cgit_logo_link; | 73 | extern char *cgit_logo_link; |
74 | extern char *cgit_module_link; | ||
73 | extern char *cgit_virtual_root; | 75 | extern char *cgit_virtual_root; |
74 | extern char *cgit_cache_root; | 76 | extern char *cgit_cache_root; |
75 | 77 | ||
76 | extern int cgit_nocache; | 78 | extern int cgit_nocache; |
77 | extern int cgit_snapshots; | 79 | extern int cgit_snapshots; |
78 | extern int cgit_max_lock_attempts; | 80 | extern int cgit_max_lock_attempts; |
79 | extern int cgit_cache_root_ttl; | 81 | extern int cgit_cache_root_ttl; |
80 | extern int cgit_cache_repo_ttl; | 82 | extern int cgit_cache_repo_ttl; |
81 | extern int cgit_cache_dynamic_ttl; | 83 | extern int cgit_cache_dynamic_ttl; |
82 | extern int cgit_cache_static_ttl; | 84 | extern int cgit_cache_static_ttl; |
83 | extern int cgit_cache_max_create_time; | 85 | extern int cgit_cache_max_create_time; |
84 | 86 | ||
85 | extern int cgit_max_msg_len; | 87 | extern int cgit_max_msg_len; |
86 | 88 | ||
87 | extern char *cgit_repo_name; | 89 | extern char *cgit_repo_name; |
88 | extern char *cgit_repo_desc; | 90 | extern char *cgit_repo_desc; |
89 | extern char *cgit_repo_owner; | 91 | extern char *cgit_repo_owner; |
90 | 92 | ||
91 | extern int cgit_query_has_symref; | 93 | extern int cgit_query_has_symref; |
92 | extern int cgit_query_has_sha1; | 94 | extern int cgit_query_has_sha1; |
93 | 95 | ||
94 | extern char *cgit_querystring; | 96 | extern char *cgit_querystring; |
95 | extern char *cgit_query_repo; | 97 | extern char *cgit_query_repo; |
96 | extern char *cgit_query_page; | 98 | extern char *cgit_query_page; |