mirror of
https://git.zx2c4.com/cgit
synced 2024-11-23 00:48:42 +00:00
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>
This commit is contained in:
parent
7d9b5590f4
commit
135a755404
@ -135,7 +135,7 @@ static int walk_tree(const unsigned char *sha1, struct strbuf *base,
|
|||||||
struct walk_tree_context *walk_tree_ctx = cbdata;
|
struct walk_tree_context *walk_tree_ctx = cbdata;
|
||||||
|
|
||||||
if (base->len == walk_tree_ctx->match_baselen) {
|
if (base->len == walk_tree_ctx->match_baselen) {
|
||||||
if (S_ISREG(mode)) {
|
if (S_ISREG(mode) || S_ISLNK(mode)) {
|
||||||
if (print_object(sha1, pathname))
|
if (print_object(sha1, pathname))
|
||||||
walk_tree_ctx->match = 1;
|
walk_tree_ctx->match = 1;
|
||||||
} else if (S_ISDIR(mode)) {
|
} else if (S_ISDIR(mode)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user