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
Junio C Hamano <junkio@cox.net>
Date
Nov 19, 2005, 00:49 UTC
Message-ID
<7v3bltea1t.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0511180915560.13959@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
Show 10 quoted lines
> On Fri, 18 Nov 2005, sf wrote:
>> 
>> 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.
>
> 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.

I agree with what you said about commit objects and what they are meant to describe. At the same time, I am sympathetic if somebody wants to be able to say just "The change this commit brings in can be used to modify the behaviour X to Y". An implied prerequisite for such a statement is that you can apply such a change only to something that has behaviour X, and internally works in a certain way to exhibit that behaviour, to begin with (IOW, otherwise the patch does not apply). While your "commit describes all the history leading to it" obviously satisfies that prerequisite, it is stronger than necessary.

For that matter, "tree A changed into tree B" is stronger than necessary as well. There are trees other than tree A that has the same behaviour X, and applying such a change would be valid to modify its behaviour to Y.

You are absolutely right that commit messages should be taken in the context of the history leading to it. However, when we exchange patches via e-mail, or do "rebase" in the repository, we also use the commit message to label the change -- and with that usage, the log message becomes less about describing the history and more about "modifies X to Y", so it is easy to get confused.

Previous: Linus TorvaldsNext: Linus Torvalds
Message 22 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.