From 579efd9fcc01e92278f8a2a42a39c52aa6a900a1 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Tue, 27 Oct 2026 18:35:45 -1000 Subject: Offer the versions as an option enable-version-info brings back the cgit and git versions that 872bd7c took off the footer and the generator tag, for a site that wants them, and the version f7d2b83 put on the signature of patches now follows it too. It stays off by default for the reason 872bd7c gave. --- source/ui-patch.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source/ui-patch.c') diff --git a/source/ui-patch.c b/source/ui-patch.c index 78c850c..04083fe 100644 --- a/source/ui-patch.c +++ b/source/ui-patch.c @@ -132,7 +132,8 @@ void cgit_print_patch(const char *new_rev, const char *old_rev, const char *pref cgit_print_http_headers(); // git format-patch signs with its bare version number, so the v that - // cgit's tags carry is left off to read the same way. + // cgit's tags carry is left off to read the same way. Without + // enable-version-info the signature names cgit alone. if (!skip_prefix(cgit_version, "v", &version)) version = cgit_version; @@ -141,6 +142,9 @@ void cgit_print_patch(const char *new_rev, const char *old_rev, const char *pref // Two dashes and a space is the mail signature separator, so // git am and mail readers drop the version note below rather // than carrying it into the commit message. - printf("-- \ncgit %s\n\n", version); + if (ctx.cfg.enable_version_info) + printf("-- \ncgit %s\n\n", version); + else + printf("-- \ncgit\n\n"); } } -- cgit 2.12.1