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