diff options
author | Lars Hjemli | 2012-03-18 20:59:36 +0000 |
---|---|---|
committer | Lars Hjemli | 2012-03-18 20:59:36 +0000 |
commit | 2b9fab8d30420d935745c4d84ea22412ab2485e5 (patch) | |
tree | 664ebc3d061fd7e89393af67bfbc406f3b600be0 /ui-plain.c | |
parent | 08352c7a02f057f6cbaf817ca7e53c53be590a62 (diff) | |
parent | 3fbaf097153b239b092d11a178ace96671f9f3ec (diff) | |
download | cgit-2b9fab8d30420d935745c4d84ea22412ab2485e5.tar.gz cgit-2b9fab8d30420d935745c4d84ea22412ab2485e5.tar.bz2 cgit-2b9fab8d30420d935745c4d84ea22412ab2485e5.zip |
Merge branch 'lh/module-links'
Diffstat (limited to 'ui-plain.c')
-rw-r--r-- | ui-plain.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -97,11 +97,14 @@ static void print_dir_entry(const unsigned char *sha1, const char *base, | |||
97 | char *fullpath; | 97 | char *fullpath; |
98 | 98 | ||
99 | fullpath = buildpath(base, baselen, path); | 99 | fullpath = buildpath(base, baselen, path); |
100 | if (!S_ISDIR(mode)) | 100 | if (!S_ISDIR(mode) && !S_ISGITLINK(mode)) |
101 | fullpath[strlen(fullpath) - 1] = 0; | 101 | fullpath[strlen(fullpath) - 1] = 0; |
102 | html(" <li>"); | 102 | html(" <li>"); |
103 | cgit_plain_link(path, NULL, NULL, ctx.qry.head, ctx.qry.sha1, | 103 | if (S_ISGITLINK(mode)) { |
104 | fullpath); | 104 | cgit_submodule_link(NULL, fullpath, sha1_to_hex(sha1)); |
105 | } else | ||
106 | cgit_plain_link(path, NULL, NULL, ctx.qry.head, ctx.qry.sha1, | ||
107 | fullpath); | ||
105 | html("</li>\n"); | 108 | html("</li>\n"); |
106 | match = 2; | 109 | match = 2; |
107 | } | 110 | } |