else if (rel.len && rel.buf[rel.len - 1] == '/')
strbuf_setlen(&rel, rel.len - 1);
else if (rel.len && rel.buf[rel.len - 1] == '/')
strbuf_setlen(&rel, rel.len - 1);
if (starts_with(repo->name, repo->section)) {
repo->name += strlen(repo->section);
if (*repo->name == '/')
if (starts_with(repo->name, repo->section)) {
repo->name += strlen(repo->section);
if (*repo->name == '/')
if (!dir) {
fprintf(stderr, "Error opening directory %s: %s (%d)\n",
path, strerror(errno), errno);
if (!dir) {
fprintf(stderr, "Error opening directory %s: %s (%d)\n",
path, strerror(errno), errno);
strbuf_add(&pathbuf, path, strlen(path));
if (is_git_dir(pathbuf.buf)) {
strbuf_add(&pathbuf, path, strlen(path));
if (is_git_dir(pathbuf.buf)) {