X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/cc1dbd1b5d610bd5e626f54d310f11cf47684ea1..ded9393b173853d2e960f9b176aeb0bc4ed35be2:/ui-tree.c?ds=sidebyside diff --git a/ui-tree.c b/ui-tree.c index 60f7560..dee8309 100644 --- a/ui-tree.c +++ b/ui-tree.c @@ -15,11 +15,11 @@ static int print_entry(const unsigned char *sha1, const char *base, { char *name; enum object_type type; - unsigned long size; + unsigned long size = 0; name = xstrdup(pathname); type = sha1_object_info(sha1, &size); - if (type == OBJ_BAD) { + if (type == OBJ_BAD && !S_ISDIRLNK(mode)) { htmlf("Bad object: %s %s", name, sha1_to_hex(sha1)); @@ -27,26 +27,27 @@ static int print_entry(const unsigned char *sha1, const char *base, } html(""); html_filemode(mode); - html(""); + html("%s => submodule", name); + htmlf("class='ls-mod'>%s", name); } else { - html("
%s
", name); } - html(""); + htmlf("'>%s", name); htmlf("%li", size); html("\n"); free(name);