On Fri, Aug 28, 2009 at 20:42, Alex Riesen<raa.lkml@xxxxxxxxx> wrote: > On Fri, Aug 28, 2009 at 20:39, Jeff King<peff@xxxxxxxx> wrote: >> On Fri, Aug 28, 2009 at 08:27:06PM +0200, Alex Riesen wrote: >> >>> > Thanks, that is a much better solution. And I don't know offhand of any >>> > portability problems in overriding the library at link time. >>> Hm, how about supplying show_date and approxidate with current time? Like this: /* exported */ const char *show_date_rel(unsigned long time, int tz, struct timeval *now) { ... the DATE_RELATIVE path of show_date } const char *show_date(unsigned long time, int tz, enum date_mode mode) { struct timeval now; if (mode == DATE_RELATIVE) { gettimeofday(&now, NULL); return show_date_rel(time, tz, &now); } ... other paths of old show_date } Still affects the performance, but much less, and no side effects. And you can test show_date_rel path in test-date.c -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html