Skip to content

Commit

Permalink
ui-plain: print symlink content
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
johnkeeping authored and zx2c4 committed Aug 10, 2017
1 parent 113f4b8 commit 51cc456
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui-plain.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 51cc456

Please sign in to comment.