#include <cmark-gfm.h>
#endif
-#include "cp.h"
#include "compat.h"
+#include "cp.h"
struct deltainfo {
git_patch *patch;
fputs("<p> ", fp);
xmlencode(fp, filename, strlen(filename));
fprintf(fp, " (%s)", convertbytes((int)filesize));
-
fputs("</p><hr/>", fp);
if (git_blob_is_binary((git_blob *)obj)) {
writeblobhtml(filename, fp, (git_blob *)obj);
if (ferror(fp))
err(1, "fwrite");
+ else if (htmlized) {
+ /* NOTE: recurses */
+ char newfpath[PATH_MAX];
+ strcat(newfpath, fpath);
+ char newfilename[PATH_MAX];
+ strcat(newfilename, filename);
+ writeblob(obj, strcat(newfpath, "-raw"),
+ strcat(newfilename, "-raw"), filesize);
+ // TODO: Add view-raw button
+ }
}
writefooter(fp);