* [PATCH] ui-plain: fix to show a repo's root directory listing in plain view
@ 2016-02-22 7:36 jea-signup-cgit
2016-02-22 17:47 ` Jason
0 siblings, 1 reply; 2+ messages in thread
From: jea-signup-cgit @ 2016-02-22 7:36 UTC (permalink / raw)
This is to fix the case of accessing http://host.com/cgit.cgi/repo.git/plain/
There is code here to make this case work (match_baselen is set to -1
for top-of-the-tree views) but the unsigned to signed comparison was
always false in this case, causing an empty directory listing without
this fix.
Signed-off-by: Joe Anakata <jea-signup-github at anakata.org>
---
ui-plain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui-plain.c b/ui-plain.c
index ff85113..b4e3bef 100644
--- a/ui-plain.c
+++ b/ui-plain.c
@@ -143,7 +143,7 @@ static int walk_tree(const unsigned char *sha1, struct strbuf *base,
walk_tree_ctx->match = 2;
return READ_TREE_RECURSIVE;
}
- } else if (base->len > walk_tree_ctx->match_baselen) {
+ } else if ((int)base->len > walk_tree_ctx->match_baselen) {
print_dir_entry(sha1, base->buf, base->len, pathname, mode);
walk_tree_ctx->match = 2;
} else if (S_ISDIR(mode)) {
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] ui-plain: fix to show a repo's root directory listing in plain view
2016-02-22 7:36 [PATCH] ui-plain: fix to show a repo's root directory listing in plain view jea-signup-cgit
@ 2016-02-22 17:47 ` Jason
0 siblings, 0 replies; 2+ messages in thread
From: Jason @ 2016-02-22 17:47 UTC (permalink / raw)
Merged!
https://git.zx2c4.com/cgit/commit/?id=de6098be6a65a4758ff8eac6359bd6fd30ba7bd3
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20160222/0a28e29a/attachment.html>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-22 17:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-22 7:36 [PATCH] ui-plain: fix to show a repo's root directory listing in plain view jea-signup-cgit
2016-02-22 17:47 ` Jason
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).