aboutsummaryrefslogtreecommitdiffstats
path: root/scan-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'scan-tree.c')
-rw-r--r--scan-tree.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/scan-tree.c b/scan-tree.c
index 1cb4e5d..fa21fc4 100644
--- a/scan-tree.c
+++ b/scan-tree.c
@@ -164,10 +164,10 @@ static void add_repo(const char *base, struct strbuf *path, repo_config_fn fn)
}
if (slash && !n) {
*slash = '\0';
- repo->section = xstrdup(rel.buf);
+ repo->section = get_or_create_section(rel.buf);
*slash = '/';
- if (starts_with(repo->name, repo->section)) {
- repo->name += strlen(repo->section);
+ if (starts_with(repo->name, repo->section->name)) {
+ repo->name += strlen(repo->section->name);
if (*repo->name == '/')
repo->name++;
}