summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);