stagit

Be more explicit when stripping the .git suffix

sin contact@arjunchoudhary.com

commit: 8e4dc17 parent: 863d212
1 files changed, 2 insertions(+), 1 deletions(-)
Mstagit-index.c+2-1
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);