* [PATCH 1/1] ui-shared: Simplify cgit_print_error_page() logic
@ 2016-05-11 17:50 wub
2016-05-11 18:31 ` john
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: wub @ 2016-05-11 17:50 UTC (permalink / raw)
---
This may be a little controversial, but right now is there a reason not
to do this?
ui-shared.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/ui-shared.c b/ui-shared.c
index 9a38aa9..d9541f0 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -792,13 +792,11 @@ void cgit_print_error_page(int code, const char *msg, const char *fmt, ...)
ctx.page.expires = ctx.cfg.cache_dynamic_ttl;
ctx.page.status = code;
ctx.page.statusmsg = msg;
- cgit_print_http_headers();
- cgit_print_docstart();
- cgit_print_pageheader();
+ cgit_print_layout_start()
va_start(ap, fmt);
cgit_vprint_error(fmt, ap);
va_end(ap);
- cgit_print_docend();
+ cgit_print_layout_end();
}
void cgit_print_layout_start(void)
--
2.8.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] ui-shared: Simplify cgit_print_error_page() logic
2016-05-11 17:50 [PATCH 1/1] ui-shared: Simplify cgit_print_error_page() logic wub
@ 2016-05-11 18:31 ` john
2016-05-12 15:26 ` Jason
2016-05-12 15:38 ` Jason
2 siblings, 0 replies; 4+ messages in thread
From: john @ 2016-05-11 18:31 UTC (permalink / raw)
On Wed, May 11, 2016 at 05:50:09PM +0000, Juuso Lapinlampi wrote:
> ---
> This may be a little controversial, but right now is there a reason not
> to do this?
No, I think this makes sense (although again we need your
signed-off-by).
Reviewed-by: John Keeping <john at keeping.me.uk>
> ui-shared.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/ui-shared.c b/ui-shared.c
> index 9a38aa9..d9541f0 100644
> --- a/ui-shared.c
> +++ b/ui-shared.c
> @@ -792,13 +792,11 @@ void cgit_print_error_page(int code, const char *msg, const char *fmt, ...)
> ctx.page.expires = ctx.cfg.cache_dynamic_ttl;
> ctx.page.status = code;
> ctx.page.statusmsg = msg;
> - cgit_print_http_headers();
> - cgit_print_docstart();
> - cgit_print_pageheader();
> + cgit_print_layout_start()
> va_start(ap, fmt);
> cgit_vprint_error(fmt, ap);
> va_end(ap);
> - cgit_print_docend();
> + cgit_print_layout_end();
> }
>
> void cgit_print_layout_start(void)
> --
> 2.8.1
>
> _______________________________________________
> CGit mailing list
> CGit at lists.zx2c4.com
> http://lists.zx2c4.com/mailman/listinfo/cgit
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] ui-shared: Simplify cgit_print_error_page() logic
2016-05-11 17:50 [PATCH 1/1] ui-shared: Simplify cgit_print_error_page() logic wub
2016-05-11 18:31 ` john
@ 2016-05-12 15:26 ` Jason
2016-05-12 15:38 ` Jason
2 siblings, 0 replies; 4+ messages in thread
From: Jason @ 2016-05-12 15:26 UTC (permalink / raw)
Merged, thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20160512/c9905a57/attachment.html>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] ui-shared: Simplify cgit_print_error_page() logic
2016-05-11 17:50 [PATCH 1/1] ui-shared: Simplify cgit_print_error_page() logic wub
2016-05-11 18:31 ` john
2016-05-12 15:26 ` Jason
@ 2016-05-12 15:38 ` Jason
2 siblings, 0 replies; 4+ messages in thread
From: Jason @ 2016-05-12 15:38 UTC (permalink / raw)
On Wed, May 11, 2016 at 7:50 PM, Juuso Lapinlampi <wub at partyvan.eu> wrote:
> - cgit_print_docstart();
> - cgit_print_pageheader();
> + cgit_print_layout_start()
> va_start(ap, fmt);
You forgot a semicolon. Please test your commits before you submit.
Otherwise you waste everyone's time.
Fixed it up myself.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-05-12 15:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-11 17:50 [PATCH 1/1] ui-shared: Simplify cgit_print_error_page() logic wub
2016-05-11 18:31 ` john
2016-05-12 15:26 ` Jason
2016-05-12 15:38 ` Jason
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).