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

[PATCH 0/7] Make diff3 the default conflict style

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Jun 9, 2021, 19:28 UTC
Message-ID
<20210609192842.696646-1-felipe.contreras@gmail.com>

This patch series turned out much more complicated that simply flipping the switch and dealing with the consequences. Apparently some commands are completely ignoring the configuration (notes and merge-tree), and others are handling it wrong (checkout).

So in preparation I created a new test to make sure these rowdy commands handle the configuration correctly, and then step by step I fix them.

Once all the commands are fixed I proceed to cleanup xdiff-interface in preparation for the switch.

And finally once the switch is flipped the documnetation is updated, and funch of test scripts receive a temporary configuration that returns them to the old "merge" (diff2) behavior so they pass with minimum changes.

I have already written patches to update the tests so no configuration is needed and they parse the diff3 style directly, but the series is already quite verbose as it is.

One salient thorn is that from my point of view merge_recursive_config() is implemtend wrongly and thus can't be called as other configuration functions, like git_diff_basic_config(). It seems there's a huge area of opportunity there to clean all that up, but that's for another series.

Felipe Contreras (7):
  test: add merge style config test
  merge-tree: fix merge.conflictstyle handling
  notes: fix merge.conflictstyle handling
  checkout: fix merge.conflictstyle handling
  xdiff: rename XDL_MERGE_STYLE_DIFF3
  xdiff: simplify style assignments
  xdiff: make diff3 the default conflictStyle
 Documentation/config/merge.txt           |  12 +--
 Documentation/git-merge-file.txt         |   2 +
 Documentation/git-merge.txt              |  28 ++----
 Documentation/git-rerere.txt             |   2 +-
 Documentation/gitattributes.txt          |   6 +-
 Documentation/technical/rerere.txt       |   3 +-
 Documentation/user-manual.txt            |   6 +-
 builtin/merge-file.c                     |   5 +-
 builtin/merge-recursive.c                |   3 +
 builtin/merge-tree.c                     |   4 +
 builtin/merge.c                          |   4 +
 builtin/notes.c                          |   3 +-
 ll-merge.c                               |   3 +-
 merge-recursive.c                        |   2 +-
 sequencer.c                              |   5 +
 t/t2023-checkout-m.sh                    |   2 +
 t/t3310-notes-merge-manual-resolve.sh    |   2 +
 t/t3311-notes-merge-fanout.sh            |   2 +
 t/t3404-rebase-interactive.sh            |   2 +
 t/t3507-cherry-pick-conflict.sh          |   2 +
 t/t4017-diff-retval.sh                   |   2 +
 t/t4048-diff-combined-binary.sh          |   2 +
 t/t4200-rerere.sh                        |   2 +
 t/t4300-merge-tree.sh                    |   2 +
 t/t6402-merge-rename.sh                  |   2 +
 t/t6403-merge-file.sh                    |   2 +
 t/t6404-recursive-merge.sh               |   2 +
 t/t6416-recursive-corner-cases.sh        |   2 +
 t/t6417-merge-ours-theirs.sh             |   2 +
 t/t6418-merge-text-auto.sh               |   2 +
 t/t6422-merge-rename-corner-cases.sh     |   2 +
 t/t6423-merge-rename-directories.sh      |   1 +
 t/t6428-merge-conflicts-sparse.sh        |   1 +
 t/t6432-merge-recursive-space-options.sh |   2 +
 t/t6440-config-conflict-markers.sh       | 123 +++++++++++++++++++++++
 t/t7201-co.sh                            |   2 +
 t/t7506-status-submodule.sh              |   1 +
 xdiff-interface.c                        |   6 +-
 xdiff/xdiff.h                            |   3 +-
 xdiff/xmerge.c                           |   4 +-
 40 files changed, 217 insertions(+), 46 deletions(-)
 create mode 100755 t/t6440-config-conflict-markers.sh
-- 
2.32.0.2.g41be0a4e50
Next: Felipe Contreras
Message 1 of 69 in “Make diff3 the default conflict style”
  1. 0/7 Make diff3 the default conflict styleFelipe Contreras, Jun 9, 2021
  2. 1/7 test: add merge style config testFelipe Contreras, Jun 9, 2021
  3. Eric SunshineJun 9, 2021
  4. Felipe ContrerasJun 9, 2021
  5. Phillip WoodJun 10, 2021
  6. Felipe ContrerasJun 10, 2021
  7. Phillip WoodJun 10, 2021
  8. Felipe ContrerasJun 10, 2021
  9. Phillip WoodJun 10, 2021
  10. Felipe ContrerasJun 10, 2021
  11. Phillip WoodJun 11, 2021
  12. Felipe ContrerasJun 11, 2021
  13. 3/7 notes: fix merge.conflictstyle handlingFelipe Contreras, Jun 9, 2021
  14. 7/7 xdiff: make diff3 the default conflictStyleFelipe Contreras, Jun 9, 2021
  15. Johannes SixtJun 10, 2021
  16. Đoàn Trần Công DanhJun 10, 2021
  17. Felipe ContrerasJun 10, 2021
  18. Felipe ContrerasJun 10, 2021
  19. Jeff KingJun 10, 2021
  20. Felipe ContrerasJun 10, 2021
  21. Jeff KingJun 10, 2021
  22. Junio C HamanoJun 11, 2021
  23. Johannes SixtJun 11, 2021
  24. Junio C HamanoJun 11, 2021
  25. Johannes SixtJun 11, 2021
  26. Junio C HamanoJun 11, 2021
  27. Sergey OrganovJun 11, 2021
  28. Felipe ContrerasJun 11, 2021
  29. Sergey OrganovJun 11, 2021
  30. Felipe ContrerasJun 11, 2021
  31. Johannes SixtJun 11, 2021
  32. Felipe ContrerasJun 11, 2021
  33. Sergey OrganovJun 11, 2021
  34. Felipe ContrerasJun 11, 2021
  35. Sergey OrganovJun 11, 2021
  36. Felipe ContrerasJun 11, 2021
  37. Felipe ContrerasJun 11, 2021
  38. Johannes SixtJun 11, 2021
  39. Felipe ContrerasJun 11, 2021
  40. Felipe ContrerasJun 11, 2021
  41. Phillip WoodJun 10, 2021
  42. Felipe ContrerasJun 10, 2021
  43. 5/7 xdiff: rename XDL_MERGE_STYLE_DIFF3Felipe Contreras, Jun 9, 2021
  44. Phillip WoodJun 10, 2021
  45. Felipe ContrerasJun 10, 2021
  46. Junio C HamanoJun 11, 2021
  47. Felipe ContrerasJun 11, 2021
  48. 6/7 xdiff: simplify style assignmentsFelipe Contreras, Jun 9, 2021
  49. Phillip WoodJun 10, 2021
  50. Felipe ContrerasJun 10, 2021
  51. 2/7 merge-tree: fix merge.conflictstyle handlingFelipe Contreras, Jun 9, 2021
  52. 4/7 checkout: fix merge.conflictstyle handlingFelipe Contreras, Jun 9, 2021
  53. Phillip WoodJun 10, 2021
  54. Felipe ContrerasJun 10, 2021
  55. Phillip WoodJun 10, 2021
  56. Felipe ContrerasJun 10, 2021
  57. Phillip WoodJun 11, 2021
  58. Felipe ContrerasJun 11, 2021
  59. Phillip WoodJun 11, 2021
  60. Phillip WoodJun 17, 2021
  61. Felipe ContrerasJun 17, 2021
  62. Felipe ContrerasJun 11, 2021
  63. Elijah NewrenJun 11, 2021
  64. Felipe ContrerasJun 11, 2021
  65. Felipe ContrerasJun 11, 2021
  66. Elijah NewrenJun 11, 2021
  67. Felipe ContrerasJun 11, 2021
  68. Elijah NewrenJun 11, 2021
  69. Felipe ContrerasJun 13, 2021

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.