about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2017-03-06 23:27:23 +0000
committerJason A. Donenfeld <Jason@zx2c4.com>2017-08-10 16:05:07 +0200
commit51cc456b773a3bb7253fad2146c1a0d2b0fa98cb (patch)
tree4c6fc087bf0b24f50aadd266c191e10e604ac5cd
parentcgit: don't set vpath unless repo is set (diff)
downloadcgit-pink-51cc456b773a3bb7253fad2146c1a0d2b0fa98cb.tar.gz
cgit-pink-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>
Diffstat (limited to '')
-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)) {
d17&follow=1'>Add The Bone Shard EmperorJune McEnroe Suffers a little bit from middle book but I really enjoyed it. Read it faster than the first one too, despite its length. 2022-06-25Bump xterm font size to 12June McEnroe 2022-06-10Handle subshells (and functions) inside substitutionsJune McEnroe 2022-06-10Switch to jorts Install scriptJune McEnroe 2022-06-08Indicate if still reading or no resultsJune McEnroe 2022-06-08Add Maiden, Mother, CroneJune McEnroe Mixed bag like most collections of short stories. Some of them are pretty good. The author of the worst written story also has the worst written bio. 2022-06-05FIRST SHOW IN 2.5 YEARS BABEY!!!June McEnroe 2022-06-03Set line number on File linesJune McEnroe 2022-06-03Stop polling stdin after EOFJune McEnroe 2022-06-02Set TABSIZE=4June McEnroe Absolutely indiscriminately. 2022-06-02Do basic match highlightingJune McEnroe 2022-06-02Clean up parsing a littleJune McEnroe 2022-06-02Don't duplicate path stringJune McEnroe 2022-06-02Use stderr instead of /dev/tty, realloc buffer if lines too longJune McEnroe For some reason I haven't been able to figure out, trying to poll /dev/tty returns POLLNVAL (and this was using 100% CPU looping), but using stderr instead works fine. 2022-06-02Add initial working version of qfJune McEnroe 2022-05-29Set prompt for okshJune McEnroe