commit 138291aa75163baf132c6c5fc27461cc2672d89a
parent ea81cac695a183e44338722d2514e8686a5f02ac
Author: Leah (ctucx) <leah@ctu.cx>
Date: Tue, 24 May 2022 13:27:47 +0200
parent ea81cac695a183e44338722d2514e8686a5f02ac
Author: Leah (ctucx) <leah@ctu.cx>
Date: Tue, 24 May 2022 13:27:47 +0200
rename: printshowfile -> writecommitdiff
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/stagit.c b/stagit.c @@ -691,7 +691,7 @@ writecommit(FILE *fp, struct commitinfo *ci) } void -printshowfile(FILE *fp, struct commitinfo *ci) +writecommitdiff(FILE *fp, struct commitinfo *ci) { const git_diff_delta *delta; const git_diff_hunk *hunk; @@ -701,8 +701,6 @@ printshowfile(FILE *fp, struct commitinfo *ci) char linestr[80]; int c; - writecommit(fp, ci); - if (!ci->deltas) return; @@ -892,9 +890,12 @@ writelog(FILE *fp, const git_oid *oid) if (r) { relpath = "../"; fpfile = efopen(path, "w"); + writeheader(fpfile, ci->summary, "log"); - printshowfile(fpfile, ci); + writecommit(fpfile, ci); + writecommitdiff(fpfile, ci); writefooter(fpfile); + checkfileerror(fpfile, path, 'w'); fclose(fpfile); }