about summary refs log tree commit diff stats
path: root/ui-plain.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui-plain.c')
-rw-r--r--ui-plain.c9
1 files changed, 6 insertions, 3 deletions
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,
147 char *fullpath; 147 char *fullpath;
148 148
149 fullpath = buildpath(base, baselen, path); 149 fullpath = buildpath(base, baselen, path);
150 if (!S_ISDIR(mode)) 150 if (!S_ISDIR(mode) && !S_ISGITLINK(mode))
151 fullpath[strlen(fullpath) - 1] = 0; 151 fullpath[strlen(fullpath) - 1] = 0;
152 html(" <li>"); 152 html(" <li>");
153 cgit_plain_link(path, NULL, NULL, ctx.qry.head, ctx.qry.sha1, 153 if (S_ISGITLINK(mode)) {
154 fullpath); 154 cgit_submodule_link(NULL, fullpath, sha1_to_hex(sha1));
155 } else
156 cgit_plain_link(path, NULL, NULL, ctx.qry.head, ctx.qry.sha1,
157 fullpath);
155 html("</li>\n"); 158 html("</li>\n");
156 match = 2; 159 match = 2;
157} 160}