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

Re: [RFC/PATCH] mergetool: use resolved conflicts in all the views

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Dec 19, 2020, 20:18 UTC
Message-ID
<5fde601ee30f5_1e50c72081c@natae.notmuch>
In-Reply-To
<xmqqpn35odnm.fsf@gitster.c.googlers.com>
Junio C Hamano wrote:
Show 37 quoted lines
> Felipe Contreras <felipe.contreras@gmail.com> writes:
> 
> > Junio C Hamano wrote:
> >> Seth House <seth@eseth.com> writes:
> >> 
> >> > I think where we're not seeing eye-to-eye is that you're focusing on
> >> > potential "negative" consequences whereas I'm talking about having more
> >> > information about the merge rather than less.
> >> >
> >> > There is very likely no negative consequences for most, if not all,
> >> > mergetools. I wrote the initial version of diffconflicts ten years ago
> >> > and I've been using it nearly every day since. I'm fairly confident in
> >> > the end result. What is a fact is there is undisputedly less information
> >> > about the merge if we overwrite LOCAL and REMOTE; as I've written,
> >> > I think the tradeoff is worthwhile for most tools but a per-tool
> >> > configuration will allow people that feel differently to choose
> >> > differently.
> >> 
> >> Thanks for stressing this point.
> >> 
> >> When a user or developer asks for a reasonable feature (e.g.
> >> configurability to suit personal taste), especially when there is no
> >> obvious downside for adding it, the burden of proof is on the party
> >> who refuses to add it
> >
> > Sorry, but no.
> >
> > You may be the final word in the git project, but the burden of proof is
> > an essential part of logic, not project-dependent, and that's just not
> > the case.
> >
> > *Anyone* that makes any claim has the burden of proof.
> 
> Yes, and in this case, Seth already said he prefers to be able to
> see the original, and not necessarily all the users of his mergetool
> backend prefer the same thing.  That is enough "proof" to me that
> the need exists.
That's not proof. That's one person stating his opinion.

He did not present evidence of *why* one of his users would prefer to turn this flag off in his tool, but not others.

Here, allow me to show what diffconflicts does:
diff --git a/mergetools/vimdiff b/mergetools/vimdiff
index abc8ce4ec4..a8fd8e4a84 100644
--- a/mergetools/vimdiff
+++ b/mergetools/vimdiff
@@ -29,6 +29,10 @@ merge_cmd () {
 				"$LOCAL" "$REMOTE" "$MERGED"
 		fi
 		;;
+	*vimdiff4)
+		cp "$LOCAL" "$MERGED"
+		"$merge_tool_path" -f -d "$MERGED" "$REMOTE"
+		;;
 	esac
 }
 

"mergetool.automerge=true" plus the code above replicates the main
functionality of the diffconflicts plugin.

Why would anyone want to turn off automerge for vimdiff4, but not for
vimdiff2?

Nobody has explained that.

> It is your turn to prove your (implicit) claim that it does more harm
> than it helps to allow such a preference expressed by end users.

No. The burden of proof is still on the side that claims such preference
is desirable.

"I think X" is not evidence of X.

> > Is there a conflict in this example?
> >
> >   echo Hello > BASE
> >   echo Hello > LOCAL
> >   echo Hello. > REMOTE
> >   git merge-file -p LOCAL BASE REMOTE
> 
> Sorry, but I do not see why that example matters.

But I do. That's why I asked the question.

> Would such a case even come into the picture to be resolved by "git
> mergetool" in the first place?

That is precisely the point.

It is not a conflict because that line only has changes in REMOTE, but
not in LOCAL. Correct?

git doesn't bother the user because there's no merge conflict.

But if there is an *actual conflict* some lines below, why should git,
or git-mergetool, or the mergetool now bother the user presenting it the
diff of the "Hello." line?

Why does that line that according to you "wouldn't not even come into
the picture" becomes suddenly relevant when there's an actual conflict
below?

Either the "Hello." change is relevant or it isn't.

But more importantly; its relevance doesn't depend on the mergetool.

Choosing vimdiff4 doesn't magically make it a conflict.

Cheer.
-- 
Felipe Contreras
Previous: Junio C HamanoNext: Seth House
Message 25 of 70 in “mergetool: use resolved conflicts in all the views”
  1. mergetool: use resolved conflicts in all the viewsFelipe Contreras, Dec 16, 2020
  2. Junio C HamanoDec 16, 2020
  3. Seth HouseDec 16, 2020
  4. Junio C HamanoDec 17, 2020
  5. Felipe ContrerasDec 17, 2020
  6. Johannes SixtDec 17, 2020
  7. Felipe ContrerasDec 17, 2020
  8. Johannes SixtDec 17, 2020
  9. Felipe ContrerasDec 18, 2020
  10. Seth HouseDec 17, 2020
  11. Felipe ContrerasDec 17, 2020
  12. Seth HouseDec 17, 2020
  13. Junio C HamanoDec 17, 2020
  14. Felipe ContrerasDec 18, 2020
  15. Felipe ContrerasDec 18, 2020
  16. Seth HouseDec 18, 2020
  17. Felipe ContrerasDec 18, 2020
  18. Seth HouseDec 18, 2020
  19. Felipe ContrerasDec 18, 2020
  20. Seth HouseDec 19, 2020
  21. Felipe ContrerasDec 19, 2020
  22. Junio C HamanoDec 19, 2020
  23. Felipe ContrerasDec 19, 2020
  24. Junio C HamanoDec 19, 2020
  25. Felipe ContrerasDec 19, 2020
  26. Seth HouseDec 21, 2020
  27. Felipe ContrerasDec 21, 2020
  28. Seth HouseDec 21, 2020
  29. Felipe ContrerasDec 21, 2020
  30. David AguilarDec 21, 2020
  31. Code of conduct violation?Felipe Contreras, Dec 21, 2020
  32. Junio C HamanoDec 22, 2020
  33. Felipe ContrerasDec 22, 2020
  34. Pratyush YadavDec 22, 2020
  35. Felipe ContrerasDec 23, 2020
  36. Junio C HamanoDec 23, 2020
  37. Felipe ContrerasDec 23, 2020
  38. Nobody is THE one making contributionJunio C Hamano, Dec 23, 2020
  39. Felipe ContrerasDec 23, 2020
  40. Junio C HamanoDec 23, 2020
  41. Felipe ContrerasDec 24, 2020
  42. Ævar Arnfjörð BjarmasonDec 24, 2020
  43. Felipe ContrerasDec 24, 2020
  44. Ævar Arnfjörð BjarmasonDec 24, 2020
  45. Felipe ContrerasDec 24, 2020
  46. Junio C HamanoDec 24, 2020
  47. Felipe ContrerasDec 27, 2020
  48. Junio C HamanoDec 27, 2020
  49. Felipe ContrerasDec 27, 2020
  50. Junio C HamanoDec 28, 2020
  51. Felipe ContrerasDec 28, 2020
  52. Randall S. BeckerDec 24, 2020
  53. Felipe ContrerasDec 24, 2020
  54. Junio C HamanoDec 24, 2020
  55. David AguilarDec 24, 2020
  56. Felipe ContrerasDec 24, 2020
  57. Junio C HamanoDec 18, 2020
  58. Felipe ContrerasDec 18, 2020
  59. Junio C HamanoDec 19, 2020
  60. Felipe ContrerasDec 19, 2020
  61. David AguilarDec 20, 2020
  62. Felipe ContrerasDec 20, 2020
  63. David AguilarDec 20, 2020
  64. Felipe ContrerasDec 21, 2020
  65. Seth HouseDec 19, 2020
  66. Felipe ContrerasDec 16, 2020
  67. Junio C HamanoDec 17, 2020
  68. Felipe ContrerasDec 17, 2020
  69. mergetool: use resolved conflicts in all the viewsFelipe Contreras, Dec 17, 2020
  70. Felipe ContrerasDec 21, 2020

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.