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

Re: Why do dates in refspecs require the reflog?

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 30, 2014, 20:47 UTC
Message-ID
<xmqq1tngsw55.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CAHd499Cvy=zi=9utoZ2bEgdSUTjkveHMP2OvVFPBHq7W2MuoZQ@mail.gmail.com>
Robert Dailey <rcdailey.lists@gmail.com> writes:
> ... how can I view the
> contents of a file at a specified relative time frame ...

"git log --until=A --since=B master" asks Git to start traversing the history backward from the tip of your current 'master' branch, without showing anything until it finds a commit with timestamp A (or before), and then show the commits it finds during the traversal until it finds a commit with timestamp B (or before) and then stop.

Which I think is the closest thing you are asking for.

Note that there is *no* guarantee that any of these commits you find that way was actually at the tip of the public history (i.e. the one casual users would have seen after running "git clone" at that time).

The committer may have started working at around time B, worked for quite some time, and pushed the result out way after time A. Then the first time general public observed the commits you find in that time range could be after time A by many weeks, which is perfectly normal in the real, distributed, world.

Previous: Junio C HamanoNext: Michael Haggerty
Message 4 of 9 in “Why do dates in refspecs require the reflog?”
  1. Robert DaileyDec 30, 2014
  2. Stefan BellerDec 30, 2014
  3. Junio C HamanoDec 30, 2014
  4. Junio C HamanoDec 30, 2014
  5. Michael HaggertyDec 30, 2014
  6. Junio C HamanoDec 30, 2014
  7. Robert DaileyDec 30, 2014
  8. Jeff KingDec 31, 2014
  9. Michael HaggertyDec 30, 2014

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.