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