summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2017-03-06 23:27:23 (GMT)
committerLukas Fleischer <lfleischer@lfos.de>2017-08-10 13:15:58 (GMT)
commit135a75540421a3c8b82634730a3765d1e49442ea (patch)
tree6cdb129defc194920f6fb02153e3788184318b8d
parent7d9b5590f4ffbc5d8a6fe30e3e9715ad4b5ca7bd (diff)
downloadcgit-135a75540421a3c8b82634730a3765d1e49442ea.zip
cgit-135a75540421a3c8b82634730a3765d1e49442ea.tar.gz
cgit-135a75540421a3c8b82634730a3765d1e49442ea.tar.bz2
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)) {