all repos — cgit @ 51cc456b773a3bb7253fad2146c1a0d2b0fa98cb

a hyperfast web frontend for git written in c

ui-plain: print symlink content

We currently ignore symlinks in ui-plain, leading to a 404.  In ui-tree
we print the content of the blob (that is, the path to the target of the
link), so it makes sense to do the same here.

Signed-off-by: John Keeping <john@keeping.me.uk>
John Keeping john@keeping.me.uk
Mon, 06 Mar 2017 23:27:23 +0000
commit

51cc456b773a3bb7253fad2146c1a0d2b0fa98cb

parent

113f4b85886bc5eb6b319fd048623b8d43b7bce0

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M ui-plain.cui-plain.c

@@ -135,7 +135,7 @@ {

struct walk_tree_context *walk_tree_ctx = cbdata; if (base->len == walk_tree_ctx->match_baselen) { - if (S_ISREG(mode)) { + if (S_ISREG(mode) || S_ISLNK(mode)) { if (print_object(sha1, pathname)) walk_tree_ctx->match = 1; } else if (S_ISDIR(mode)) {