From: Demonstrandum Date: Thu, 6 Aug 2020 01:00:57 +0000 (+0100) Subject: Pass in filename not fpath. X-Git-Url: https://git.armaanb.net/?p=stagit.git;a=commitdiff_plain;h=7870b366e47a740633b497bfd766aad6cb10ae64 Pass in filename not fpath. --- diff --git a/highlight b/highlight index 8273a3b..ba17566 100755 --- a/highlight +++ b/highlight @@ -36,4 +36,4 @@ print('') -print("Lexer: {}.".format(lexer), file=stderr) +print("Filename: {}; Lexer: {}.".format(filename, lexer), file=stderr) diff --git a/stagit.c b/stagit.c index bb64869..98a1830 100644 --- 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("

Binary file.

\n", fp); } else { - lc = writeblobhtml(fpath, fp, (git_blob *)obj); + lc = writeblobhtml(filename, fp, (git_blob *)obj); if (ferror(fp)) err(1, "fwrite"); }