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

Re: Walking commits from the first

From
Jon Seymour <jon.seymour@gmail.com>
Date
Feb 15, 2010, 14:20 UTC
Message-ID
<2cfc40321002150620i7e290c10pfc978ec9754a914a@mail.gmail.com>
In-Reply-To
<2cfc40321002150605l4de9d970t919ee56d7a3d697e@mail.gmail.com>
On Tue, Feb 16, 2010 at 1:05 AM, Jon Seymour <jon.seymour@gmail.com> wrote:
Show 10 quoted lines
> On Mon, Feb 15, 2010 at 10:33 PM, Pavan Kumar Sunkara
>
> The history is useful for understanding how something came to be -
> commits followed backwards down one merge branch will tend to have
> some semantic relationship to each other unless your committers are on
> acid. Trying to comprehend the evolution of history by replaying it
> forwards and keeping track of n parallel threads of development as
> they diverge seems like an unnecessarily complicated way of trying to
> comprehend the world.
>

That said, of course, git once had an option to rev-list that I contributed (--merge-order) that attempted to create the best possible linear history by performing a topological sort that minimised the number of "jumps" between semantically unrelated commits in the linear order. The algorithm was kind of cool (based as it was on a conservation of mass analogy), but it eventually got stripped out for various eminently understandable reasons (like no-one was using it, I wasn't maintaining it and it was the only remaining use of a dependency on the open-ssl infinite precision integer arithmetic libraries that complicated the build).

git rev-list --topo-order will do a topological sort that guarantees that you never visit a commit before visiting all its ancestors.

Show 8 quoted lines
> jon.
>
>> --
>> To unsubscribe from this list: send the line "unsubscribe git" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
Previous: Jon Seymour
Message 5 of 5 in “Walking commits from the first”
  1. Pavan Kumar SunkaraFeb 15, 2010
  2. Jeff KingFeb 15, 2010
  3. Pavan Kumar SunkaraFeb 15, 2010
  4. Jon SeymourFeb 15, 2010
  5. Jon SeymourFeb 15, 2010

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.