author | Lars Hjemli <hjemli@gmail.com> | 2007-05-18 01:00:54 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-05-18 20:51:01 (UTC) |
commit | 30ccdcaa74ebc0aab2b7843b0db8251d0ddf56de (patch) (unidiff) | |
tree | efb3eddd091117281d5592c9eab44bc63121edf6 /cgit.h | |
parent | 43d40f2b704151d145a1383b2b964210915ecae4 (diff) | |
download | cgit-30ccdcaa74ebc0aab2b7843b0db8251d0ddf56de.zip cgit-30ccdcaa74ebc0aab2b7843b0db8251d0ddf56de.tar.gz cgit-30ccdcaa74ebc0aab2b7843b0db8251d0ddf56de.tar.bz2 |
Enable url=value querystring parameter
This makes is possible to use repo-urls like '/pub/scm/git/git.git' and
even add path specifications, like '/pub/scm/git/git.git/log/documentation'.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | cgit.h | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -22,11 +22,11 @@ | |||
22 | * The valid cgit repo-commands | 22 | * The valid cgit repo-commands |
23 | */ | 23 | */ |
24 | #define CMD_LOG = 1; | 24 | #define CMD_LOG 1 |
25 | #define CMD_COMMIT = 1; | 25 | #define CMD_COMMIT 2 |
26 | #define CMD_DIFF = 1; | 26 | #define CMD_DIFF 3 |
27 | #define CMD_TREE = 1; | 27 | #define CMD_TREE 4 |
28 | #define CMD_VIEW = 1; | 28 | #define CMD_VIEW 5 |
29 | #define CMD_BLOB = 1; | 29 | #define CMD_BLOB 6 |
30 | #define CMD_SNAPSHOT = 1; | 30 | #define CMD_SNAPSHOT 7 |
31 | 31 | ||
32 | typedef void (*configfn)(const char *name, const char *value); | 32 | typedef void (*configfn)(const char *name, const char *value); |
@@ -83,4 +83,5 @@ extern const char cgit_version[]; | |||
83 | extern struct repolist cgit_repolist; | 83 | extern struct repolist cgit_repolist; |
84 | extern struct repoinfo *cgit_repo; | 84 | extern struct repoinfo *cgit_repo; |
85 | extern int cgit_cmd; | ||
85 | 86 | ||
86 | extern char *cgit_root_title; | 87 | extern char *cgit_root_title; |
@@ -163,4 +164,5 @@ extern int cgit_parse_query(char *txt, configfn fn); | |||
163 | extern struct commitinfo *cgit_parse_commit(struct commit *commit); | 164 | extern struct commitinfo *cgit_parse_commit(struct commit *commit); |
164 | extern struct taginfo *cgit_parse_tag(struct tag *tag); | 165 | extern struct taginfo *cgit_parse_tag(struct tag *tag); |
166 | extern void cgit_parse_url(const char *url); | ||
165 | 167 | ||
166 | extern char *cache_safe_filename(const char *unsafe); | 168 | extern char *cache_safe_filename(const char *unsafe); |