Diff options
Diffstat (limited to 'source/ui-tree.c')
| -rw-r--r-- | source/ui-tree.c | 9 |
1 file changed, 7 insertions, 2 deletions
diff --git a/source/ui-tree.c b/source/ui-tree.c index 63b8984..f1b995a 100644 --- a/source/ui-tree.c +++ b/source/ui-tree.c @@ -470,6 +470,11 @@ static int walk_tree(const struct object_id *oid, struct strbuf *base, strbuf_release(&fullpath); ls_head(); return READ_TREE_RECURSIVE; + } else if (S_ISGITLINK(mode)) { + cgit_print_submodule_page(fullpath.buf, oid_to_hex(oid)); + walk->state = WALK_ERROR_SHOWN; + strbuf_release(&fullpath); + return 0; } else { bool shown = print_object(oid, mode, fullpath.buf, pathname, walk->rev); @@ -524,6 +529,6 @@ void cgit_print_tree(const char *rev, char *path) } else if (walk.state == WALK_LOOKING) { cgit_print_error_page(404, "Not Found", "Path not found"); } - // WALK_ERROR_SHOWN is left alone, since the error page print_object - // put out is already complete. + // WALK_ERROR_SHOWN is left alone, since the error page the walk put + // out is already complete. } |
