On Mon, Aug 31, 2015 at 02:50:18PM -0400, Jeff King wrote:

> diff --git a/fast-import.c b/fast-import.c
> index 6c7c3c9..b19a1b5 100644
> --- a/fast-import.c
> +++ b/fast-import.c
> @@ -412,6 +412,10 @@ static void write_crash_report(const char *err)
>       struct branch *b;
>       unsigned long lu;
>       struct recent_command *rc;
> +     struct date_mode dm;
> +
> +     dm.type = DATE_NORMAL;
> +     dm.local = 1;
>  
>       if (!rpt) {
>               error("can't write crash report %s: %s", loc, strerror(errno));
> @@ -424,7 +428,7 @@ static void write_crash_report(const char *err)
>       fprintf(rpt, "fast-import crash report:\n");
>       fprintf(rpt, "    fast-import process: %"PRIuMAX"\n", (uintmax_t) 
> getpid());
>       fprintf(rpt, "    parent process     : %"PRIuMAX"\n", (uintmax_t) 
> getppid());
> -     fprintf(rpt, "    at %s\n", show_date(time(NULL), 0, DATE_MODE(LOCAL)));
> +     fprintf(rpt, "    at %s\n", show_date(time(NULL), 0, &dm));
>       fputc('\n', rpt);
>  
>       fputs("fatal: ", rpt);

I also considered just switching this hunk to another format. I doubt
that anybody cares what format the fast-import crash-report timestamp is
in. And in fact LOCAL is kind of a bad choice. Using the user's timezone
is fine, but _omitting_ the timezone in a crash report seems like a
recipe for confusion. Probably iso8601-local would be saner.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to