summaryrefslogtreecommitdiffabout
path: root/ui-tree.c
Unidiff
Diffstat (limited to 'ui-tree.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-tree.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/ui-tree.c b/ui-tree.c
index e16b638..1037c82 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -45,33 +45,32 @@ static void print_object(const unsigned char *sha1, char *path)
45 html("</td></tr>\n"); 45 html("</td></tr>\n");
46 start = idx + 1; 46 start = idx + 1;
47 } 47 }
48 idx++; 48 idx++;
49 } 49 }
50 html("</table>\n"); 50 html("</table>\n");
51} 51}
52 52
53 53
54static int ls_item(const unsigned char *sha1, const char *base, int baselen, 54static int ls_item(const unsigned char *sha1, const char *base, int baselen,
55 const char *pathname, unsigned int mode, int stage) 55 const char *pathname, unsigned int mode, int stage)
56{ 56{
57 char *name; 57 char *name;
58 char *fullpath; 58 char *fullpath;
59 enum object_type type; 59 enum object_type type;
60 unsigned long size = 0; 60 unsigned long size = 0;
61 char *url, *qry;
62 61
63 name = xstrdup(pathname); 62 name = xstrdup(pathname);
64 fullpath = fmt("%s%s%s", cgit_query_path ? cgit_query_path : "", 63 fullpath = fmt("%s%s%s", cgit_query_path ? cgit_query_path : "",
65 cgit_query_path ? "/" : "", name); 64 cgit_query_path ? "/" : "", name);
66 65
67 type = sha1_object_info(sha1, &size); 66 type = sha1_object_info(sha1, &size);
68 if (type == OBJ_BAD && !S_ISDIRLNK(mode)) { 67 if (type == OBJ_BAD && !S_ISDIRLNK(mode)) {
69 htmlf("<tr><td colspan='3'>Bad object: %s %s</td></tr>", 68 htmlf("<tr><td colspan='3'>Bad object: %s %s</td></tr>",
70 name, 69 name,
71 sha1_to_hex(sha1)); 70 sha1_to_hex(sha1));
72 return 0; 71 return 0;
73 } 72 }
74 73
75 html("<tr><td class='ls-mode'>"); 74 html("<tr><td class='ls-mode'>");
76 html_filemode(mode); 75 html_filemode(mode);
77 html("</td><td>"); 76 html("</td><td>");