about summary refs log tree commit diff
path: root/scan-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'scan-tree.c')
-rw-r--r--scan-tree.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/scan-tree.c b/scan-tree.c
index beb584b..a1ec8fb 100644
--- a/scan-tree.c
+++ b/scan-tree.c
@@ -113,6 +113,8 @@ static void add_repo(const char *base, struct strbuf *path, repo_config_fn fn)
 
 	if (!strcmp(rel.buf + rel.len - 5, "/.git"))
 		strbuf_setlen(&rel, rel.len - 5);
+	else if (rel.len && rel.buf[rel.len - 1] == '/')
+		strbuf_setlen(&rel, rel.len - 1);
 
 	repo = cgit_add_repo(rel.buf);
 	config_fn = fn;