- commit
- 2156c3ddc0496fe076a47576de7b891cea516f84
- parent
- dd1c8d7bf63d2f6cdfc10999c8090d66dac41395
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2024-09-05 11:03
generate diff files
Diffstat
M | src/stagit.c.in | 15 | +++++++++++++++ |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/stagit.c.in b/src/stagit.c.in
@@ -523,6 +523,14 @@ err: 523 523 } 524 524 525 525 void -1 526 write_diff(FILE *fp, git_diff *diff) -1 527 { -1 528 git_buf buf = GIT_BUF_INIT; -1 529 git_diff_to_buf(&buf, diff, GIT_DIFF_FORMAT_PATCH); -1 530 fprintf(fp, "%s", buf.ptr); -1 531 } -1 532 -1 533 void 526 534 write_log_header(FILE *fp) 527 535 { 528 536 T("<table id=\"log\">\n"); @@ -784,6 +792,13 @@ process_commits(FILE *fp_log, FILE *fp_atom, size_t m) 784 792 fclose(fp_commit); 785 793 } 786 794 -1 795 snprintf(path, sizeof(path), "commit/%s.diff", oidstr); -1 796 if (force_commits || access(path, F_OK)) { -1 797 fp_commit = efopen(path, "w"); -1 798 write_diff(fp_commit, diff); -1 799 fclose(fp_commit); -1 800 } -1 801 787 802 m -= 1; 788 803 git_diff_free(diff); 789 804 commitinfo_free(ci);