]> git.armaanb.net Git - stagit.git/commitdiff
Be more explicit when stripping the .git suffix
authorsin <sin@2f30.org>
Wed, 6 Jan 2016 17:44:22 +0000 (17:44 +0000)
committersin <sin@2f30.org>
Wed, 6 Jan 2016 17:45:57 +0000 (17:45 +0000)
stagit-index.c

index 44b603cddf72d8aae6e843a66406b37ca0a64590..9c31bd7038874a3822b1d84a5efaf7d546df5a51 100644 (file)
@@ -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);