X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/fb3b94710febc3fb456201ce3486d09f65d0946f..181b6e789b79fc385e5ec75b2b83f01192d54051:/ui-plain.c diff --git a/ui-plain.c b/ui-plain.c index 733db4d..2abd210 100644 --- a/ui-plain.c +++ b/ui-plain.c @@ -97,11 +97,14 @@ static void print_dir_entry(const unsigned char *sha1, const char *base, char *fullpath; fullpath = buildpath(base, baselen, path); - if (!S_ISDIR(mode)) + if (!S_ISDIR(mode) && !S_ISGITLINK(mode)) fullpath[strlen(fullpath) - 1] = 0; html("
  • "); - cgit_plain_link(path, NULL, NULL, ctx.qry.head, ctx.qry.sha1, - fullpath); + if (S_ISGITLINK(mode)) { + cgit_submodule_link(NULL, fullpath, sha1_to_hex(sha1)); + } else + cgit_plain_link(path, NULL, NULL, ctx.qry.head, ctx.qry.sha1, + fullpath); html("
  • \n"); match = 2; }