summaryrefslogtreecommitdiffabout
path: root/ui-tree.c
Side-by-side diff
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 eb3d3ac..db0bef6 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -26,49 +26,48 @@ static void print_object(const unsigned char *sha1, char *path)
}
buf = read_sha1_file(sha1, &type, &size);
if (!buf) {
cgit_print_error(fmt("Error reading object %s",
sha1_to_hex(sha1)));
return;
}
html("<table class='blob'>\n");
idx = 0;
start = 0;
lineno = 0;
while(idx < size) {
if (buf[idx] == '\n') {
buf[idx] = '\0';
htmlf("<tr><td class='no'>%d</td><td class='txt'>",
++lineno);
html_txt(buf + start);
html("</td></tr>\n");
start = idx + 1;
}
idx++;
}
- html("\n</td></tr>\n");
html("</table>\n");
}
static int ls_item(const unsigned char *sha1, const char *base, int baselen,
const char *pathname, unsigned int mode, int stage)
{
char *name;
enum object_type type;
unsigned long size = 0;
char *url, *qry;
name = xstrdup(pathname);
type = sha1_object_info(sha1, &size);
if (type == OBJ_BAD && !S_ISDIRLNK(mode)) {
htmlf("<tr><td colspan='3'>Bad object: %s %s</td></tr>",
name,
sha1_to_hex(sha1));
return 0;
}
qry = fmt("h=%s&amp;path=%s%s%s", curr_rev,
cgit_query_path ? cgit_query_path : "",
cgit_query_path ? "/" : "", pathname);
url = cgit_pageurl(cgit_query_repo, "tree", qry);