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

Re: [PATCH] range-diff: optionally include merge commits' diffs in the analysis

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 11, 2024, 00:20 UTC
Message-ID
<xmqqzfm6k4e5.fsf@gitster.g>
In-Reply-To
<CABPp-BEaZXZ2wSfrkkOAX6W9An8MTf-LEVNKvXvRTxyV9XcKcA@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
> That's particularly odd since the first category is the most
> common, and the third (snuck in unrelated changes or "evil changes")
> are the most rare.  Maybe we should just call these "user-modified
> merges" rather than "evil merges"?  Any better suggestions?

It is "evil" in the sense that it makes it really tough for those who dig history to find out what happened later to figure out where the change came from. It could be an attempt to hide a malicious and unrelated change, it could be a resolution for a non-textual conflict, or it could be a "while at it I am fixing an unrelated typo I spotted nearby while resolving this textual conflict".

The change does not have to have an evil intent. It is just something different from and more than what the textual and mechanical merge would produce.

"more than" may give us a hint for what we want to convey in the name, if we were to pick a new name. If a new topic changed a function signature to add one extra parameter, and updated all the callers of the function that existed back when the topic forked, an "evil" merge needs to address the semantic conflicts to do a very similar update to a new call to the function added on the mainline since the topic forked, when the topic is merged back to the mainline. Taken as a whole, the first-parent diff of such a merge will show that a function gained a parameter, and all of its callers have been adjusted for that change. Most of such changes would have come from the side branch, but on top of that, the merge needed to contribute more of the similar changes to callers.

Previous: Elijah NewrenNext: Junio C Hamano
Message 6 of 21 in “range-diff: optionally include merge commits' diffs in the analysis”
  1. range-diff: optionally include merge commits' diffs in the analysisJohannes Schindelin via GitGitGadget, Nov 7, 2024
  2. Junio C HamanoNov 8, 2024
  3. Johannes SixtNov 8, 2024
  4. Johannes SchindelinNov 8, 2024
  5. Elijah NewrenNov 9, 2024
  6. Junio C HamanoNov 11, 2024
  7. Junio C HamanoNov 8, 2024
  8. Elijah NewrenNov 8, 2024
  9. range-diff: optionally include merge commits' diffs in the analysisJohannes Schindelin via GitGitGadget, Nov 8, 2024
  10. Elijah NewrenNov 8, 2024
  11. Johannes SchindelinNov 11, 2024
  12. Philippe BlainNov 10, 2024
  13. Johannes SchindelinNov 11, 2024
  14. Junio C HamanoNov 26, 2024
  15. Junio C HamanoNov 11, 2024
  16. Elijah NewrenNov 11, 2024
  17. Junio C HamanoNov 12, 2024
  18. 0/2 Support diff merges option in range diffJohannes Schindelin via GitGitGadget, Dec 16, 2024
  19. 1/2 range-diff: optionally include merge commits' diffs in the analysisJohannes Schindelin via GitGitGadget, Dec 16, 2024
  20. 2/2 range-diff: introduce the convenience option `--remerge-diff`Johannes Schindelin via GitGitGadget, Dec 16, 2024
  21. Elijah NewrenNov 8, 2024

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.