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

Re: How to (re-)create .git/logs/refs

From
Nicolas Pitre <nico@cam.org>
Date
May 8, 2008, 17:28 UTC
Message-ID
<alpine.LFD.1.10.0805081313190.23581@xanadu.home>
In-Reply-To
<200805081256.11465.hs4233@mail.mn-solutions.de>
On Thu, 8 May 2008, Holger Schurig wrote:
> So my question:
> 
> a) is there a way to re-create .git/logs/refs ?
No.

The reflog records how _you_ modified your various branches locally. This has no direct relationship with the dates the commits in those branches were created. It records what was your own view of the repository in time. So if you performed an import of a SVN repository last week, then it is normal that you don't have any view into that particular repository's state before last week.

Show 6 quoted lines
> b) is there a simple way to get a list of ISO-dates and
>    associated SHA1?  Then I could use a little python code to
>    determine the SHA1 id that corresponds to some date (I need
>    to access old versions of the source via bitbake and/or
>    www.openembedded.org, so adding a custom fetch method with
>    some python magic is a non-brainer).

Have a look at the documentation for the --pretty=format option in the git-log man page. For example:

	git log --pretty=format:"%H %ai"
might be just what you're looking for.
Nicolas
Previous: Holger SchurigNext: Holger Schurig
Message 3 of 10 in “How to (re-)create .git/logs/refs”
  1. Holger SchurigMay 8, 2008
  2. Holger SchurigMay 8, 2008
  3. Nicolas PitreMay 8, 2008
  4. Holger SchurigMay 13, 2008
  5. Holger SchurigMay 13, 2008
  6. Andreas EricssonMay 13, 2008
  7. Johannes SchindelinMay 13, 2008
  8. Holger SchurigMay 13, 2008
  9. Jakub NarebskiMay 13, 2008
  10. Holger SchurigMay 13, 2008

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.