|
diff --git a/shared.c b/shared.c index 1a5b866..06693b0 100644 --- a/ shared.c+++ b/ shared.c |
|
@@ -54,25 +54,25 @@ char *cgit_query_search = NULL; |
54 | char *cgit_query_sha1 = NULL; |
54 | char *cgit_query_sha1 = NULL; |
55 | char *cgit_query_sha2 = NULL; |
55 | char *cgit_query_sha2 = NULL; |
56 | char *cgit_query_path = NULL; |
56 | char *cgit_query_path = NULL; |
57 | char *cgit_query_name = NULL; |
57 | char *cgit_query_name = NULL; |
58 | int cgit_query_ofs = 0; |
58 | int cgit_query_ofs = 0; |
59 | |
59 | |
60 | int htmlfd = 0; |
60 | int htmlfd = 0; |
61 | |
61 | |
62 | |
62 | |
63 | int cgit_get_cmd_index(const char *cmd) |
63 | int cgit_get_cmd_index(const char *cmd) |
64 | { |
64 | { |
65 | static char *cmds[] = {"log", "commit", "diff", "tree", "blob", |
65 | static char *cmds[] = {"log", "commit", "diff", "tree", "blob", |
66 | "snapshot", NULL}; |
66 | "snapshot", "tag", NULL}; |
67 | int i; |
67 | int i; |
68 | |
68 | |
69 | for(i = 0; cmds[i]; i++) |
69 | for(i = 0; cmds[i]; i++) |
70 | if (!strcmp(cmd, cmds[i])) |
70 | if (!strcmp(cmd, cmds[i])) |
71 | return i + 1; |
71 | return i + 1; |
72 | return 0; |
72 | return 0; |
73 | } |
73 | } |
74 | |
74 | |
75 | int chk_zero(int result, char *msg) |
75 | int chk_zero(int result, char *msg) |
76 | { |
76 | { |
77 | if (result != 0) |
77 | if (result != 0) |
78 | die("%s: %s", msg, strerror(errno)); |
78 | die("%s: %s", msg, strerror(errno)); |
|