Be more explicit when stripping the .git suffix
1 files changed, 2 insertions(+), 1 deletions(-) | |||
---|---|---|---|
M | stagit-index.c | +2 | -1 |
1@@ -152,7 +152,8 @@ writelog(FILE *fp)
2 if (!(stripped_name = strdup(name)))
3 err(1, "strdup");
4 if ((p = strrchr(stripped_name, '.')))
5- *p = '\0';
6+ if (!strcmp(p, ".git"))
7+ *p = '\0';
8 xmlencode(fp, stripped_name, strlen(stripped_name));
9
10 fputs("</a></td><td>", fp);