]> git.armaanb.net Git - stagit.git/commitdiff
Pass in filename not fpath.
authorDemonstrandum <moi@knutsen.co>
Thu, 6 Aug 2020 01:00:57 +0000 (02:00 +0100)
committerDemonstrandum <moi@knutsen.co>
Thu, 6 Aug 2020 01:00:57 +0000 (02:00 +0100)
highlight
stagit.c

index 8273a3b6ca7be074efc9cbdc6f298ba5b7185042..ba17566d7d88492e957142078fd95ccb381312b7 100755 (executable)
--- a/highlight
+++ b/highlight
@@ -36,4 +36,4 @@ print('<style>')
 print(FORMAT.get_style_defs('.highlight'))
 print('</style>')
 
-print("Lexer: {}.".format(lexer), file=stderr)
+print("Filename: {}; Lexer: {}.".format(filename, lexer), file=stderr)
index bb64869c5ac99adcbd444805d8672adfe1fdbd28..98a18303ec65c96048cb500629696f146ddce360 100644 (file)
--- a/stagit.c
+++ b/stagit.c
@@ -808,7 +808,7 @@ writeblob(git_object *obj, const char *fpath, const char *filename, git_off_t fi
        if (git_blob_is_binary((git_blob *)obj)) {
                fputs("<p>Binary file.</p>\n", fp);
        } else {
-               lc = writeblobhtml(fpath, fp, (git_blob *)obj);
+               lc = writeblobhtml(filename, fp, (git_blob *)obj);
                if (ferror(fp))
                        err(1, "fwrite");
        }