| tBe more explicit when stripping the .git suffix - stagit - static git page gen… | |
| git clone git://src.adamsgaard.dk/stagit | |
| Log | |
| Files | |
| Refs | |
| README | |
| LICENSE | |
| --- | |
| commit 264aef81d5f5eeb39c194142a73cdfe84c6aeddb | |
| parent cae9950407009652d52a2c140d136d3f14b4095c | |
| Author: sin <[email protected]> | |
| Date: Wed, 6 Jan 2016 17:44:22 +0000 | |
| Be more explicit when stripping the .git suffix | |
| Diffstat: | |
| M stagit-index.c | 3 ++- | |
| 1 file changed, 2 insertions(+), 1 deletion(-) | |
| --- | |
| diff --git a/stagit-index.c b/stagit-index.c | |
| t@@ -152,7 +152,8 @@ writelog(FILE *fp) | |
| if (!(stripped_name = strdup(name))) | |
| err(1, "strdup"); | |
| if ((p = strrchr(stripped_name, '.'))) | |
| - *p = '\0'; | |
| + if (!strcmp(p, ".git")) | |
| + *p = '\0'; | |
| xmlencode(fp, stripped_name, strlen(stripped_name)); | |
| fputs("</a></td><td>", fp); |