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

Re: Fix interesting git-rev-list corner case

From
Linus Torvalds <torvalds@osdl.org>
Date
Jul 30, 2005, 01:20 UTC
Message-ID
<Pine.LNX.4.58.0507291816060.29650@g5.osdl.org>
In-Reply-To
<20050730001158.GF32263@mythryan2.michonline.com>
On Fri, 29 Jul 2005, Ryan Anderson wrote:
> 
> Maybe it'd make sense to have the commits refuse to add a commit when it
> would be younger than one of it's parents?

No, the git-rev-list thing really was a bug, it was just that I hadn't thought things through when I wrote it, and the "normal" case (ie the ones I had tested) just happened to work because it's a common one.

In other words - I had taken a shortcut without thinking it through.

The date really isn't important - the algorithm I had works fine even if dates are totally screwed up, it just had a stupid bug.

And trying to make the date more important than it is will just inevitably lead to _worse_ problems down the road.

So the date is a good heuristic (we have to traverse the commits in _some_ order, and the date order just happens to be one that ends up giving the minimum number of commits "usually"), but any time we _depend_ on dates one way or the other that would be a good.

		Linus
Previous: A Large Angry SCMNext: Linus Torvalds
Message 4 of 15 in “Fix interesting git-rev-list corner case”
  1. Linus TorvaldsJul 29, 2005
  2. Ryan AndersonJul 30, 2005
  3. A Large Angry SCMJul 30, 2005
  4. Linus TorvaldsJul 30, 2005
  5. Linus TorvaldsJul 30, 2005
  6. Peter OsterlundJul 30, 2005
  7. Linus TorvaldsJul 30, 2005
  8. Peter OsterlundJul 30, 2005
  9. Linus TorvaldsJul 30, 2005
  10. Peter OsterlundJul 30, 2005
  11. Linus TorvaldsJul 30, 2005
  12. Linus TorvaldsJul 30, 2005
  13. Peter OsterlundJul 30, 2005
  14. Linus TorvaldsJul 31, 2005
  15. Junio C HamanoJul 31, 2005

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.