neocgit

a more 'modern' version of cgit
Log | Files | Refs | Submodules | README | LICENSE | git clone https://git.ne02ptzero.me/git/neocgit

commit bb3cc0d9666553608b7c89aef84d21d3312ce488
parent 9dde6d38e9fc273fc62386eeda0da2e89a2cebfc
Author: Jason A. Donenfeld <Jason@zx2c4.com>
Date:   Fri, 17 Jan 2014 15:41:41 +0100

ui-shared: do not allow negative minutes

Do to timestamp differences, sometimes cgit would should "-0 min", which
doesn't make any sense.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>

Diffstat:
Mui-shared.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/ui-shared.c b/ui-shared.c @@ -596,6 +596,8 @@ void cgit_print_age(time_t t, time_t max_relative, const char *format) return; time(&now); secs = now - t; + if (secs < 0) + secs = 0; if (secs > max_relative && max_relative >= 0) { cgit_print_date(t, format, ctx.cfg.local_time);