From: Patrick Steinhardt <ps@pks.im>
To: Luna Schwalbe <dev@luna.gl>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v2] doc: document and test `@` prefix for raw timestamps
Date: Tue, 2 Jun 2026 10:44:01 +0200 [thread overview]
Message-ID: <ah6X0X9EQdL6hn53@pks.im> (raw)
In-Reply-To: <20260602081924.673763-2-dev@luna.gl>
On Tue, Jun 02, 2026 at 10:17:36AM +0200, Luna Schwalbe wrote:
> The Git internal date format `<unix-timestamp> <time-zone-offset>`
> fails to parse when the timestamp is less than 100,000,000 (fewer than
> 9 digits). This happens to avoid potential ambiguity with other date
> formats such as `YYYYMMDD`, especially when used with approxidate.
>
> To force the parser to interpret the value as a raw timestamp, it must
> be prefixed with `@` (e.g., `@0 +0000`). This behavior was introduced
> in 2c733fb24c10a9d7aacc51f956bf9b7881980870 (parse_date(): '@' prefix
> forces git-timestamp, 2012-02-02) but was never documented.
>
> Document the `@` prefix in `Documentation/date-formats.adoc` to make
> this behavior explicit. Also add test cases to `t/t0006-date.sh` to
> verify and demonstrate the difference between prefixed and unprefixed
> small timestamps (e.g., `@2000` vs `2000`).
>
> Signed-off-by: Luna Schwalbe <dev@luna.gl>
> Co-authored-by: Junio C Hamano <gitster@pobox.com>
One nit: the order of trailers is wrong, as your Signed-off-by trailer
should always be the last line of the commit message.
It would also be great to send the new version of a series as a reply to
the previous version, so that it becomes easier for reviewers to connect
the two series.
You can use a tool like b4, which can nowadays be configured exactly
like this with `git config set b4.send-same-thread shallow`. b4 overall
makes all of the mailing list wrangling a ton easier. Makes me wonder
whether we should maybe highlight this tool more in our docs.
The patch itself looks good to me, thanks!
Patrick
next prev parent reply other threads:[~2026-06-02 8:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 8:17 [PATCH v2] doc: document and test `@` prefix for raw timestamps Luna Schwalbe
2026-06-02 8:44 ` Patrick Steinhardt [this message]
2026-06-02 9:20 ` Junio C Hamano
2026-06-02 9:14 ` Junio C Hamano
2026-06-02 16:35 ` Luna Schwalbe
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ah6X0X9EQdL6hn53@pks.im \
--to=ps@pks.im \
--cc=dev@luna.gl \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox