summaryrefslogtreecommitdiffabout
path: root/shared.c
Unidiff
Diffstat (limited to 'shared.c') (more/less context) (ignore whitespace changes)
-rw-r--r--shared.c2
1 files changed, 1 insertions, 1 deletions
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;
57char *cgit_query_sha1 = NULL; 57char *cgit_query_sha1 = NULL;
58char *cgit_query_sha2 = NULL; 58char *cgit_query_sha2 = NULL;
59char *cgit_query_path = NULL; 59char *cgit_query_path = NULL;
60char *cgit_query_name = NULL; 60char *cgit_query_name = NULL;
61int cgit_query_ofs = 0; 61int cgit_query_ofs = 0;
62 62
63int htmlfd = 0; 63int htmlfd = 0;
64 64
65 65
66int cgit_get_cmd_index(const char *cmd) 66int 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
78int chk_zero(int result, char *msg) 78int 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));