aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2017-03-06 23:27:23 +0000
committerLukas Fleischer <lfleischer@lfos.de>2017-08-10 15:15:58 +0200
commit135a75540421a3c8b82634730a3765d1e49442ea (patch)
tree6cdb129defc194920f6fb02153e3788184318b8d
parentcgit: don't set vpath unless repo is set (diff)
downloadcgit-lf/for-jason.tar.xz
cgit-lf/for-jason.zip
ui-plain: print symlink contentlf/for-jason
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>
-rw-r--r--ui-plain.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui-plain.c b/ui-plain.c
index e45d553..cfdbf73 100644
--- a/ui-plain.c
+++ b/ui-plain.c
@@ -135,7 +135,7 @@ static int walk_tree(const unsigned char *sha1, struct strbuf *base,
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)) {