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

Re: [PATCH v3] mergetool: add automerge configuration

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Dec 17, 2020, 08:31 UTC
Message-ID
<5fdb175e79748_d35b620823@natae.notmuch>
In-Reply-To
<769774cf-a55f-c9ba-c33d-233d070bb3f1@kdbg.org>
Johannes Sixt wrote:
Show 36 quoted lines
> Am 17.12.20 um 06:45 schrieb Felipe Contreras:
> > It doesn't make sense to display easily-solvable conflicts in the
> > different views of all mergetools.
> > 
> > Only the chunks that warrant conflict markers should be displayed.
> > 
> > In order to unobtrusively do this, add a new configuration:
> > mergetool.autoMerge.
> > 
> > See Seth House's blog post [1] for the idea, and the rationale.
> > 
> > [1] https://www.eseth.org/2020/mergetools.html
> > 
> > Original-idea-by: Seth House <seth@eseth.com>
> > Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> > ---
> >  Documentation/config/mergetool.txt |  3 +++
> >  git-mergetool.sh                   | 10 ++++++++++
> >  t/t7610-mergetool.sh               | 18 ++++++++++++++++++
> >  3 files changed, 31 insertions(+)
> > 
> > diff --git a/Documentation/config/mergetool.txt b/Documentation/config/mergetool.txt
> > index 16a27443a3..43af7a96f9 100644
> > --- a/Documentation/config/mergetool.txt
> > +++ b/Documentation/config/mergetool.txt
> > @@ -61,3 +61,6 @@ mergetool.writeToTemp::
> >  
> >  mergetool.prompt::
> >  	Prompt before each invocation of the merge resolution program.
> > +
> > +mergetool.autoMerge::
> > +	Automatically resolve conflicts that don't require user intervention.
> 
> As I hinted in an earlier message, some tools do know how to deal with
> unconflicted changes. This should be a setting in the tool driver, not a
> user-visible setting.

It could be done in both. We first should find a mergetool that is negatively affected by this, which WinMerge doesn't seem to be one of them:

 1. Before: https://snipboard.io/8JA5Oz.jpg
 2. After: https://snipboard.io/HUXnOg.jpg
That's a positive effect after the patch.
-- 
Felipe Contreras
Previous: Johannes SixtNext: Junio C Hamano
Message 3 of 7 in “mergetool: add automerge configuration”
  1. mergetool: add automerge configurationFelipe Contreras, Dec 17, 2020
  2. Johannes SixtDec 17, 2020
  3. Felipe ContrerasDec 17, 2020
  4. Junio C HamanoDec 18, 2020
  5. Felipe ContrerasDec 18, 2020
  6. Junio C HamanoDec 18, 2020
  7. Felipe ContrerasDec 18, 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.