section-from-path > 1

Jason A. Donenfeld Jason at zx2c4.com
Mon Aug 12 20:41:49 CEST 2013


The relevant code is here:

        if (ctx.cfg.section_from_path) {
                n  = ctx.cfg.section_from_path;
                if (n > 0) {
                        slash = rel.buf;
                        while (slash && n && (slash = strchr(slash, '/')))
                                n--;
                } else {
                        slash = rel.buf + rel.len;
                        while (slash && n && (slash = xstrrchr(rel.buf,
slash, '/')))
                                n++;
                }
                if (slash && !n) {
                        *slash = '\0';
                        repo->section = xstrdup(rel.buf);
                        *slash = '/';
                        if (!prefixcmp(repo->name, repo->section)) {
                                repo->name += strlen(repo->section);
                                if (*repo->name == '/')
                                        repo->name++;
                        }
                }
        }

I haven't looked at this closely, but do you see a bug that resembles the
issue you're seeing? Currently on vacation and I can look in more depth
when I return.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20130812/a687edfb/attachment.html>


More information about the CGit mailing list