From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: "René Scharfe" <l.s.r@web.de>, git@vger.kernel.org
Subject: rs/strbuf-addftime-zZ, was Re: What's cooking in git.git (Jun 2017, #04; Tue, 13)
Date: Wed, 14 Jun 2017 12:57:06 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.21.1.1706141245520.171564@virtualbox> (raw)
In-Reply-To: <xmqqshj34ldr.fsf@gitster.mtv.corp.google.com>
[-- Attachment #1: Type: text/plain, Size: 2335 bytes --]
Hi Junio,
On Tue, 13 Jun 2017, Junio C Hamano wrote:
> * rs/strbuf-addftime-zZ (2017-06-10) 2 commits
> - date: use localtime() for "-local" time formats
> - strbuf: let strbuf_addftime handle %z and %Z itself
>
> As there is no portable way to pass timezone information to
> strftime, some output format from "git log" and friends are
> impossible to produce. Teach our own strbuf_addftime to replace %z
> and %Z with caller-supplied values to help working around this.
>
> Will merge to 'next'.
Hold on. Have you tried to build this branch?
-- snip --
CC date.o
date.c:63:36: error: unknown type name ‘timestamp_t’
static struct tm *time_to_tm_local(timestamp_t time)
^
date.c: In function ‘show_date’:
date.c:211:8: error: implicit declaration of function ‘time_to_tm_local’
[-Werror=implicit-function-declaration]
tm = time_to_tm_local(time);
^
date.c:211:6: error: assignment makes pointer from integer without a cast
[-Werror=int-conversion]
tm = time_to_tm_local(time);
^
cc1: all warnings being treated as errors
-- snap --
I would expect this to be rebased *at least* to dddbad728c9 (timestamp_t:
a new data type for timestamps, 2017-04-26).
But even then, it fails in t0006 on Windows with this error:
-- snip --
++ eval 'diff -u "$@" '
+++ diff -u expect actual
--- expect 2017-06-14 10:53:40.126136900 +0000
+++ actual 2017-06-14 10:53:40.171146800 +0000
@@ -1 +1 @@
-1466000000 +0200 -> 2016-06-15 14:13:20 +0000 (UTC)
+1466000000 +0200 -> 2016-06-15 14:13:20 UTC (UTC)
+ test_eval_ret_=1
+ want_trace
+ test t = t
+ test t = t
+ set +x
error: last command exited with $?=1
not ok 23 - show date (format-local:%Y-%m-%d %H:%M:%S %z (%Z):1466000000 +0200)
#
# echo "$time -> $expect" >expect &&
# (
# if test -n "$zone"
# then
# TZ=$zone
# export $TZ
# fi &&
# test-date show:"$format" "$time" >actual
# ) &&
# test_cmp expect actual
-- snap --
What gives?
Ciao,
Dscho
next prev parent reply other threads:[~2017-06-14 10:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-13 21:40 What's cooking in git.git (Jun 2017, #04; Tue, 13) Junio C Hamano
2017-06-14 0:52 ` Jonathan Nieder
2017-06-15 15:54 ` Junio C Hamano
2017-06-14 7:42 ` Lars Schneider
2017-06-14 18:38 ` Torsten Bögershausen
2017-06-14 10:57 ` Johannes Schindelin [this message]
2017-06-14 11:10 ` rs/strbuf-addftime-zZ, was " Jeff King
2017-06-14 19:36 ` René Scharfe
2017-06-14 21:04 ` Johannes Schindelin
2017-06-14 23:03 ` René Scharfe
2017-06-15 5:42 ` Jeff King
2017-06-15 8:46 ` René Scharfe
2017-06-14 18:23 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.21.1.1706141245520.171564@virtualbox \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=l.s.r@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).