strip suffix .git used typically for bare repos
1 files changed, 3 insertions(+), 0 deletions(-) | |||
---|---|---|---|
M | urmoms.c | +3 | -0 |
1@@ -791,6 +791,9 @@ main(int argc, char *argv[])
2 p = xbasename(repodir);
3 snprintf(name, sizeof(name), "%s", p);
4 free(p);
5+ /* remove .git suffix, typically used by bare repos */
6+ if ((p = strstr(name, ".git")))
7+ *p = '\0';
8
9 /* read description or .git/description */
10 snprintf(path, sizeof(path), "%s%s%s",