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

Re: [RFC] Applying a graft to a tree and "rippling" the changes through

From
Linus Torvalds <torvalds@osdl.org>
Date
Nov 18, 2005, 17:25 UTC
Message-ID
<Pine.LNX.4.64.0511180915560.13959@g5.osdl.org>
In-Reply-To
<437DDDB1.60103@b-i-t.de>
On Fri, 18 Nov 2005, sf wrote:
> 
> I would go even further: The resulting tree does not depend on anything. A
> tree is a tree is a tree.
Agreed.
> A commit is really just the statement: "I changed the tree from state A to
> state B". After all, the commit message does not describe the new state
> (neither the old state) but does describe the changes.
No.
A commit is _not_ just the statement of change between two trees.

It's a statement of _history_ of the resulting tree. This is important. It's why a commit does not just point to the previous tree, but to the previous commit(s).

And that's really important. If you don't have a history of what has happened, then all the trees are just random collections of files. They're not a project any more.

So a commit doesn't just say "tree A changed into tree B". It very much says something much much stronger, which includes how you got to A in the first place.

The history is also what allow a commit to be meaningful. Without that history, you could never say "I fixed the bug that was introduced by xyz", which is often a very integral part of _why_ the change happened.

There are lots of changelog entries that don't necessarily make sense without knowing what went before them, so history is actually important even in a local sense - it's often what allows the explanation to make sense.

			Linus
Previous: sfNext: Junio C Hamano
Message 21 of 29 in “Re: [RFC] Applying a graft to a tree and "rippling" the changes through”
  1. Yann DirsonNov 17, 2005
  2. Johannes SchindelinNov 17, 2005
  3. Yann DirsonNov 19, 2005
  4. Yann DirsonNov 19, 2005
  5. Johannes SchindelinNov 19, 2005
  6. Yann DirsonNov 19, 2005
  7. Matthias UrlichsNov 19, 2005
  8. Johannes SchindelinNov 20, 2005
  9. Matthias UrlichsNov 20, 2005
  10. Johannes SchindelinNov 20, 2005
  11. Yann DirsonNov 20, 2005
  12. Paul MackerrasNov 23, 2005
  13. Matthias UrlichsNov 23, 2005
  14. Linus TorvaldsNov 23, 2005
  15. Yann DirsonNov 20, 2005
  16. Johannes SchindelinNov 20, 2005
  17. Matthias UrlichsNov 21, 2005
  18. Ryan AndersonNov 21, 2005
  19. Yann DirsonNov 21, 2005
  20. sfNov 18, 2005
  21. Linus TorvaldsNov 18, 2005
  22. Junio C HamanoNov 19, 2005
  23. Linus TorvaldsNov 19, 2005
  24. Junio C HamanoNov 19, 2005
  25. Linus TorvaldsNov 19, 2005
  26. Yann DirsonNov 19, 2005
  27. Yann DirsonNov 19, 2005
  28. Josef WeidendorferNov 18, 2005
  29. Yann DirsonNov 19, 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.