From: David Aguilar <davvid@gmail.com>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, Seth House <seth@eseth.com>,
Johannes Sixt <j6t@kdbg.org>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: [RFC/PATCH] mergetool: use resolved conflicts in all the views
Date: Sat, 19 Dec 2020 22:44:54 -0800 [thread overview]
Message-ID: <CAJDDKr6RP+TPFF2mHph7sqa-eG9uoRtqS4d4vUU84V3HJ_CMBA@mail.gmail.com> (raw)
In-Reply-To: <5fde69944fe4d_1e50c7208f@natae.notmuch>
On Sat, Dec 19, 2020 at 12:59 PM Felipe Contreras
<felipe.contreras@gmail.com> wrote:
>
> Junio C Hamano wrote:
> > Felipe Contreras <felipe.contreras@gmail.com> writes:
> >
> > >> Another reason why allowing users to disable the feature per tool is
> > >> important is because as far as I know we have kept the mergetool
> > >> framework to allow adding a tool that can merge binary data, and
> > >> leaving these three files pristine was one ingredient for that.
> > >> With only a single knob, we would be making a decision to declare
> > >> that such a tool is unwelcome, which is not quite acceptable. I
> > >> expect that users would want the new feature most of the time
> > >> because they would be managing text files more of the time, and
> > >> having only a single knob would force an unnecessary choice on those
> > >> who want to use such a binary-capable tool as well.
> > >
> > > I can't imagine what that binary data could look like, and how any tool
> > > could represent that to the user.
> >
> > What I had in mind are use cases like merging "comment"-ish part of
> > media files (e.g. exif in jpeg, id3 in mp3---things like that), as
> > I've heard some people do use Git to manage their photo collection.
>
> Right. They can do that with a text editor.
>
> > Of course, I can imagine that a cartoonist first draws a background
> > picture, cop es it twice, and then draws a dog on top of the
> > background in one copy while drawing a cat in the other. You should
> > be able to merge the resulting two pictures cleanly by following the
> > three-way merge idea (take what got changed on only one side plus
> > what did not change--anything else is a conflict) as long as these
> > animals do not overlap. You probably can even do an equivalent of
> > -Xours (not --ours) to essentially say which object is closer to the
> > viewer in a conflicting case.
>
> The whole point of separating the background from the foreground is that
> the foreground can be animated on top of the background, so they would
> always be two different files.
>
> Even if we force the issue and make two graphic artists work on two
> different branches, what they would inevitably end up doing is work on
> different layers, which for all intents and purposes are like two files.
> No mergetool is going to help them integrate their changes.
>
> > > But either way "git merge-file" fails on those cases, so we can just
> > > check if the file is empty, and bail out.
> >
> > Catching failures from merge-file and reverting back to the original
> > behaviour would be an improvement, if the code in the earlier
> > iteration was not checking errors. But I would prefer not count on
> > the tool always to fail, as there are image file formats that appear
> > to be text that are unreadable to humans (like pnm),
>
> git would not add conflict markers on the part of a pnm file that did
> not change, so in fact, a person merging pnm files might in fact desire
> automerge.
>
> > and my primary reason for configurability is as an escape hatch to be
> > used in cases where we do not anticipate here.
>
> Once again: "mergetool.automerge=false" is a thing.
>
> > Listing "what about this case, it does not break" million times would
> > not help us here.
>
> This is the philosophical problem of induction: a million white swans
> doesn't prove all swans are white.
>
> The only thing we know for certain is that there is no known problem.
> And that if and when such a problem occurs, we would need to think about
> the proper solution.
>
> > With per-tool enable/disable option, the users do not have to rely
> > on failure from merge-file anyway.
>
> They don't have to rely on that failure, they can just turn off
> mergetool.automerge.
>
>
> But fine. Let's the perfect be the enemy of the good. That seems wise.
FWIW I'm in favor of having per-tool configuration precisely for
custom mergetools that do things with custom file formats and benefit
from having all of LOCAL REMOTE and BASE.
I don't have to imagine these use cases, they are very real. No survey
can be exhaustive so being flexible and allowing for a mixed tool
ecosystem is the right choice.
This design choice is also in alignment with the general
mergetool/difftool per-tool configuration paradigm. If we didn't
support per-tool, then it would be inconsistent.
--
David
(sorry, posting from gmail's web interface so this probably won't hit
the public lists, but I probably won't reply beyond this email stating
my preference)
next prev parent reply other threads:[~2020-12-20 6:46 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-16 17:43 [RFC/PATCH] mergetool: use resolved conflicts in all the views Felipe Contreras
2020-12-16 22:24 ` Junio C Hamano
2020-12-16 22:53 ` Seth House
2020-12-17 5:18 ` Junio C Hamano
2020-12-17 5:41 ` Felipe Contreras
2020-12-17 7:35 ` Johannes Sixt
2020-12-17 8:27 ` Felipe Contreras
2020-12-17 19:23 ` Johannes Sixt
2020-12-18 2:30 ` Felipe Contreras
2020-12-17 9:44 ` Seth House
2020-12-17 10:35 ` Felipe Contreras
2020-12-17 17:50 ` Seth House
2020-12-17 19:28 ` Junio C Hamano
2020-12-18 2:34 ` Felipe Contreras
[not found] ` <CANiSa6jMXTyfo43bUdC8601BvYKiF67HXo+QaiTh_-8KWyBsLg@mail.gmail.com>
2020-12-21 0:31 ` Felipe Contreras
2020-12-18 2:05 ` Felipe Contreras
2020-12-18 2:35 ` Seth House
2020-12-18 2:49 ` Felipe Contreras
2020-12-18 5:49 ` Seth House
2020-12-18 9:46 ` Felipe Contreras
2020-12-19 0:13 ` Seth House
2020-12-19 0:53 ` Felipe Contreras
2020-12-19 11:14 ` Junio C Hamano
2020-12-19 12:08 ` Felipe Contreras
2020-12-19 18:26 ` Junio C Hamano
2020-12-19 20:18 ` Felipe Contreras
2020-12-21 4:25 ` Seth House
2020-12-21 5:34 ` Felipe Contreras
2020-12-21 7:36 ` Seth House
2020-12-21 11:17 ` Felipe Contreras
2020-12-21 22:15 ` David Aguilar
2020-12-21 23:51 ` Code of conduct violation? Felipe Contreras
2020-12-22 7:13 ` Junio C Hamano
2020-12-22 9:58 ` Felipe Contreras
2020-12-22 15:01 ` Pratyush Yadav
2020-12-23 4:23 ` Felipe Contreras
2020-12-23 5:02 ` Junio C Hamano
2020-12-23 5:41 ` Felipe Contreras
2020-12-23 15:04 ` Nobody is THE one making contribution Junio C Hamano
2020-12-23 15:51 ` Felipe Contreras
2020-12-23 20:56 ` Junio C Hamano
2020-12-24 1:09 ` Felipe Contreras
2020-12-24 2:01 ` Ævar Arnfjörð Bjarmason
2020-12-24 5:19 ` Felipe Contreras
2020-12-24 12:30 ` Ævar Arnfjörð Bjarmason
2020-12-24 15:26 ` Felipe Contreras
2020-12-24 22:57 ` Junio C Hamano
2020-12-27 17:29 ` Felipe Contreras
2020-12-27 18:30 ` Junio C Hamano
2020-12-27 18:47 ` Felipe Contreras
2020-12-28 10:39 ` Junio C Hamano
2020-12-28 14:27 ` Felipe Contreras
2020-12-24 15:09 ` Randall S. Becker
2020-12-24 15:37 ` Felipe Contreras
2020-12-24 22:40 ` Junio C Hamano
2020-12-24 21:00 ` Code of conduct violation? David Aguilar
2020-12-24 22:32 ` Felipe Contreras
2020-12-18 10:04 ` [RFC/PATCH] mergetool: use resolved conflicts in all the views Junio C Hamano
2020-12-18 11:58 ` Felipe Contreras
2020-12-19 18:52 ` Junio C Hamano
2020-12-19 20:59 ` Felipe Contreras
2020-12-20 6:44 ` David Aguilar [this message]
2020-12-20 7:53 ` Felipe Contreras
2020-12-20 22:22 ` David Aguilar
2020-12-21 1:46 ` Felipe Contreras
2020-12-19 0:18 ` Seth House
2020-12-16 23:41 ` Felipe Contreras
2020-12-17 5:19 ` Junio C Hamano
2020-12-17 5:43 ` Felipe Contreras
2020-12-17 2:35 ` [RFC/PATCH v2] " Felipe Contreras
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJDDKr6RP+TPFF2mHph7sqa-eG9uoRtqS4d4vUU84V3HJ_CMBA@mail.gmail.com \
--to=davvid@gmail.com \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.org \
--cc=seth@eseth.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).