diff options
author | John Keeping | 2017-03-06 23:27:23 +0000 |
---|---|---|
committer | Jason A. Donenfeld | 2017-08-10 16:05:07 +0200 |
commit | 51cc456b773a3bb7253fad2146c1a0d2b0fa98cb (patch) | |
tree | 4c6fc087bf0b24f50aadd266c191e10e604ac5cd | |
parent | 113f4b85886bc5eb6b319fd048623b8d43b7bce0 (diff) | |
download | cgit-51cc456b773a3bb7253fad2146c1a0d2b0fa98cb.tar.gz cgit-51cc456b773a3bb7253fad2146c1a0d2b0fa98cb.tar.bz2 cgit-51cc456b773a3bb7253fad2146c1a0d2b0fa98cb.zip |
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>
-rw-r--r-- | ui-plain.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -135,7 +135,7 @@ static int walk_tree(const unsigned char *sha1, struct strbuf *base, | |||
135 | struct walk_tree_context *walk_tree_ctx = cbdata; | 135 | struct walk_tree_context *walk_tree_ctx = cbdata; |
136 | 136 | ||
137 | if (base->len == walk_tree_ctx->match_baselen) { | 137 | if (base->len == walk_tree_ctx->match_baselen) { |
138 | if (S_ISREG(mode)) { | 138 | if (S_ISREG(mode) || S_ISLNK(mode)) { |
139 | if (print_object(sha1, pathname)) | 139 | if (print_object(sha1, pathname)) |
140 | walk_tree_ctx->match = 1; | 140 | walk_tree_ctx->match = 1; |
141 | } else if (S_ISDIR(mode)) { | 141 | } else if (S_ISDIR(mode)) { |