diff options
Diffstat (limited to 'scan-tree.c')
| -rw-r--r-- | scan-tree.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scan-tree.c b/scan-tree.c index 9bf9b38..a83a78c 100644 --- a/scan-tree.c +++ b/scan-tree.c | |||
| @@ -81,6 +81,9 @@ static void add_repo(const char *base, const char *path, repo_config_fn fn) | |||
| 81 | p[strlen(p) - 5] = '\0'; | 81 | p[strlen(p) - 5] = '\0'; |
| 82 | 82 | ||
| 83 | repo = cgit_add_repo(xstrdup(p)); | 83 | repo = cgit_add_repo(xstrdup(p)); |
| 84 | if (ctx.cfg.remove_suffix) | ||
| 85 | if ((p = strrchr(repo->url, '.')) && !strcmp(p, ".git")) | ||
| 86 | *p = '\0'; | ||
| 84 | repo->name = repo->url; | 87 | repo->name = repo->url; |
| 85 | repo->path = xstrdup(path); | 88 | repo->path = xstrdup(path); |
| 86 | p = (pwd && pwd->pw_gecos) ? strchr(pwd->pw_gecos, ',') : NULL; | 89 | p = (pwd && pwd->pw_gecos) ? strchr(pwd->pw_gecos, ',') : NULL; |
