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

Re: How to check out the repository at a particular point in time

From
Michael Witten <mfwitten@gmail.com>
Date
Aug 23, 2011, 15:54 UTC
Message-ID
<CAMOZ1Bti3ZtAEOtLiUYSkWE+rO_VQd09NAn58Cn4hZBu8f-aFQ@mail.gmail.com>
In-Reply-To
<1314026326.37332.YahooMailClassic@web25408.mail.ukl.yahoo.com>
On Mon, Aug 22, 2011 at 15:18, R. Diez <rdiezmail-temp2@yahoo.de> wrote:
Show 21 quoted lines
>> The main problem is that your request is not very
>> well-defined: in
>> nonlinear history there will in general be more than one
>> commit at the
>> time requested.
>>
>>     ---a----b----c----M----  (M is a merge)
>>         \            /
>>          d-----e----f
>>
>>              ^----April 1st
>>
>> Suppose you ask git for "the newest commit as of April 1st"
>> in this history.  Is it supposed to give you b or d?
>
> I still don't quite understand how git works, but let me
> risk a naive statement here. If "a-b-c-M" were 'master',
> and "d-e-f" were 'new-feature', then on April 1st the
> current version on 'master' is 'b', because I merged the
> 'new-feature' branch at a later point in time. Does that
> make sense?
O! for the love all that is Holy!
You see, guys? The term `branch' was a TERRIBLE choice.

What git calls `branch master' in your example is just a pointer to the commit object `M'; it has nothing to do with particular lineages like `a-b-c-M'.

Please see my discussion with Hilco, starting here:
  http://marc.info/?l=git&m=131364675708355&w=2
  Message-ID: CAMOZ1BsZvXsnnWAPXR7UGKdqOMwuGB-ffaAPk55U_1dcjZUcDw@mail.gmail.com
and this email in particular:
  http://marc.info/?l=git&m=131396006222173&w=2
  Message-ID: CAMOZ1BvpnP_729YOHrrPW3B8wa5c4cLyD_qAQ5rTuy0JqNiiXg@mail.gmail.com
which also includes the following very germane link:
  http://slashdot.org/comments.pl?sid=2350536&cid=36903136
Previous: Jens LehmannNext: Jonathan Nieder
Message 5 of 12 in “How to check out the repository at a particular point in time”
  1. R. DiezAug 22, 2011
  2. Thomas RastAug 22, 2011
  3. R. DiezAug 22, 2011
  4. Jens LehmannAug 22, 2011
  5. Michael WittenAug 23, 2011
  6. Jonathan NiederAug 23, 2011
  7. Matthieu MoyAug 23, 2011
  8. Michael WittenAug 23, 2011
  9. Jonathan NiederAug 23, 2011
  10. Andreas EricssonAug 24, 2011
  11. Randal L. SchwartzAug 24, 2011
  12. Michael WittenAug 24, 2011

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.