ifix: check readme and license before writing header - stagit-gopher - A git gopher frontend. (mirror) Err bitreich.org 70 hgit clone git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/stagit-gopher/ URL:git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/stagit-gopher/ bitreich.org 70 1Log /scm/stagit-gopher/log.gph bitreich.org 70 1Files /scm/stagit-gopher/files.gph bitreich.org 70 1Refs /scm/stagit-gopher/refs.gph bitreich.org 70 1Tags /scm/stagit-gopher/tag bitreich.org 70 1README /scm/stagit-gopher/file/README.gph bitreich.org 70 1LICENSE /scm/stagit-gopher/file/LICENSE.gph bitreich.org 70 i--- Err bitreich.org 70 1commit 9b100464647ccbef09e5fe9f6e41e793c93f9753 /scm/stagit-gopher/commit/9b100464647ccbef09e5fe9f6e41e793c93f9753.gph bitreich.org 70 1parent 0808028312c76abf2fdd51678bd8ce28c2e8b2a5 /scm/stagit-gopher/commit/0808028312c76abf2fdd51678bd8ce28c2e8b2a5.gph bitreich.org 70 hAuthor: Hiltjo Posthuma URL:mailto:hiltjo@codemadness.org bitreich.org 70 iDate: Mon, 7 Dec 2015 19:00:53 +0100 Err bitreich.org 70 i Err bitreich.org 70 ifix: check readme and license before writing header Err bitreich.org 70 i Err bitreich.org 70 iDiffstat: Err bitreich.org 70 i M urmoms.c | 11 +++++++---- Err bitreich.org 70 i Err bitreich.org 70 i1 file changed, 7 insertions(+), 4 deletions(-) Err bitreich.org 70 i--- Err bitreich.org 70 1diff --git a/urmoms.c b/urmoms.c /scm/stagit-gopher/file/urmoms.c.gph bitreich.org 70 i@@ -578,6 +578,13 @@ main(int argc, char *argv[]) Err bitreich.org 70 i } Err bitreich.org 70 i Err bitreich.org 70 i /* read LICENSE */ Err bitreich.org 70 i+ if (!git_revparse_single(&obj, repo, "HEAD:LICENSE")) Err bitreich.org 70 i+ haslicense = 1; Err bitreich.org 70 i+ /* read README */ Err bitreich.org 70 i+ if (!git_revparse_single(&obj, repo, "HEAD:README")) Err bitreich.org 70 i+ hasreadme = 1; Err bitreich.org 70 i+ Err bitreich.org 70 i+ /* read LICENSE */ Err bitreich.org 70 i if (!git_revparse_single(&obj, repo, "HEAD:LICENSE")) { Err bitreich.org 70 i fp = efopen("license.html", "w+b"); Err bitreich.org 70 i writeheader(fp); Err bitreich.org 70 i@@ -587,8 +594,6 @@ main(int argc, char *argv[]) Err bitreich.org 70 i writefooter(fp); Err bitreich.org 70 i Err bitreich.org 70 i fclose(fp); Err bitreich.org 70 i- Err bitreich.org 70 i- haslicense = 1; Err bitreich.org 70 i } Err bitreich.org 70 i Err bitreich.org 70 i /* read README */ Err bitreich.org 70 i@@ -600,8 +605,6 @@ main(int argc, char *argv[]) Err bitreich.org 70 i err(1, "fwrite"); Err bitreich.org 70 i writefooter(fp); Err bitreich.org 70 i fclose(fp); Err bitreich.org 70 i- Err bitreich.org 70 i- hasreadme = 1; Err bitreich.org 70 i } Err bitreich.org 70 i Err bitreich.org 70 i fp = efopen("log.html", "w+b"); Err bitreich.org 70 .