summaryrefslogtreecommitdiff
path: root/stagit-index.c
diff options
context:
space:
mode:
authorsin <sin@2f30.org>2016-01-06 17:44:22 +0000
committersin <sin@2f30.org>2016-01-06 17:45:57 +0000
commit264aef81d5f5eeb39c194142a73cdfe84c6aeddb (patch)
tree6a568005d5644b51a528e32bcc47440b06f7626e /stagit-index.c
parentcae9950407009652d52a2c140d136d3f14b4095c (diff)
Be more explicit when stripping the .git suffix
Diffstat (limited to 'stagit-index.c')
-rw-r--r--stagit-index.c3
1 files changed, 2 insertions, 1 deletions
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("</a></td><td>", fp);