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

Re: [RFC/PATCH 0/2] Commits with ancient timestamps

From
Han-Wen Nienhuys <hanwen@google.com>
Date
Feb 3, 2012, 14:53 UTC
Message-ID
<CAFQ2z_Nb-3gai8aXRv+03N0YrAYOJ_sDPn+jruGCvYkTQAr-Pg@mail.gmail.com>
In-Reply-To
<1328218903-5681-1-git-send-email-gitster@pobox.com>
On Thu, Feb 2, 2012 at 7:41 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> Result of conversion of ancient history from other SCMs, and output from
> other third-party tools, can record timestamps that predates inception of
> Git. They can cause "git am", "git rebase" and "git commit --amend" to
> misbehave, because the raw git timestamp e.g.
>
>        author <a.u.thor@example.com> 1328214896 -0800
>
> are read from the commit object and passed to parse_date() machinery,

As a bit of context: we have some internal tools at Google that create administrative commits that should have no timestamp. I am using "0" and "1" as a deterministic timestamps in these cases (ie. the start of the epoch). While this works well in general, there are some git subcommands that barf on this, causing user-unhappiness.

This patch will hopefully resolve these breakages.
-- 
Han-Wen Nienhuys
Google Engineering Belo Horizonte
hanwen@google.com
Previous: Junio C Hamano
Message 6 of 6 in “Commits with ancient timestamps”
  1. 0/2 Commits with ancient timestampsJunio C Hamano, Feb 2, 2012
  2. 1/2 parse_date(): allow ancient git-timestampJunio C Hamano, Feb 2, 2012
  3. 2/2 parse_date(): '@' prefix forces git-timestampJunio C Hamano, Feb 2, 2012
  4. Thomas RastFeb 3, 2012
  5. Junio C HamanoFeb 3, 2012
  6. Han-Wen NienhuysFeb 3, 2012

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.