X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/d01c600c179593a53162a9d4e3040ecfc5078fdc..fe1bb0e765883fa4149fba12daee81b6ae070de3:/ui-plain.c diff --git a/ui-plain.c b/ui-plain.c index 7fecc32..85877d7 100644 --- a/ui-plain.c +++ b/ui-plain.c @@ -147,11 +147,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; }