From: sin Date: Wed, 6 Jan 2016 17:44:22 +0000 (+0000) Subject: Be more explicit when stripping the .git suffix X-Git-Url: https://git.atheridis.org/?a=commitdiff_plain;h=264aef81d5f5eeb39c194142a73cdfe84c6aeddb;p=forks%2Fstagit.git Be more explicit when stripping the .git suffix --- diff --git a/stagit-index.c b/stagit-index.c index 44b603c..9c31bd7 100644 --- a/stagit-index.c +++ b/stagit-index.c @@ -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("", fp);