git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] doc: document and test `@` prefix for raw timestamps

From
Patrick Steinhardt <ps@pks.im>
Date
Jun 2, 2026, 08:44 UTC
Message-ID
<ah6X0X9EQdL6hn53@pks.im>
In-Reply-To
<20260602081924.673763-2-dev@luna.gl>
On Tue, Jun 02, 2026 at 10:17:36AM +0200, Luna Schwalbe wrote:
Show 17 quoted lines
> 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
Previous: Luna SchwalbeNext: Junio C Hamano
Message 2 of 5 in “doc: document and test `@` prefix for raw timestamps”
  1. doc: document and test `@` prefix for raw timestampsLuna Schwalbe, Jun 2, 2026
  2. Patrick SteinhardtJun 2, 2026
  3. Junio C HamanoJun 2, 2026
  4. Junio C HamanoJun 2, 2026
  5. Luna SchwalbeJun 2, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.