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

Re: merge time

From
Robin Rosenberg <robin.rosenberg.lists@dewire.com>
Date
Jul 30, 2007, 22:11 UTC
Message-ID
<200707310011.10935.robin.rosenberg.lists@dewire.com>
In-Reply-To
<104942.93033.qm@web51008.mail.re2.yahoo.com>
måndag 30 juli 2007 skrev Matthew L Foster:
Show 10 quoted lines
> 
> --- david@lang.hm wrote:
> 
> > On Mon, 30 Jul 2007, Matthew L Foster wrote:
> > > Local commit order is stored locally right?
> > 
> > not normally. you could enable reflogs and then mine through the reflogs 
> > to find the info, but it's not stored in any easy to access fashion.
> 
> Local merge order can be extracted from git? 
Well.. depending on what your definition of merge. Yes, probably.

I dislike the term "merge" here, since no merges has to be involved, unless you include any pulled commit into the terms. Normally a merge is a commit with two or more parents. Fast forward merges are indistinguishable from normal commits.

That aside, you *can* (usually) figure the time when a commit entered the repository by examining the reflog if the set of branches are reasonably stable The reflog gives the local time when a head was modified (old and new commit) so from there you can usually go backwards. *But* that road is full of pot holes. The reflog cannot per se tell when a commit entered the local repo, it can tell when it came into view as seen from a particular head. Looking from different heads may (will) give you different times. If the head that was used to pull the commit into the repo is deleted you will not be able to tell when the commit entered the repo, nor will you be able to tell whether you can tell that or not, since the reflog for that head is gone.

The reflog doesn't list all commits, just changes to the head and it isn't necessarily linear either, ie. it may change backward in "time" forward or even to a completely separate set of commits.

The reflog is text-only: .git/logs/<ref-name>, e.g. .git/logs/refs/heads/master so you can see for yourself.

-- robin
Previous: david@lang.hm
Message 9 of 9 in “Re: merge time”
  1. Matthew L FosterJul 30, 2007
  2. Linus TorvaldsJul 30, 2007
  3. Matthew L FosterJul 30, 2007
  4. david@lang.hmJul 30, 2007
  5. Matthew L FosterJul 30, 2007
  6. david@lang.hmJul 30, 2007
  7. Matthew L FosterJul 30, 2007
  8. david@lang.hmJul 30, 2007
  9. Robin RosenbergJul 30, 2007

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.