Is it possible to configure git mergetool to avoid .orig for a given merge tool?

StackOverflow https://stackoverflow.com/questions/19110482

  •  29-06-2022
  •  | 
  •  

Question

Some parameters to configure git mergetool seem to be global and can't be set up on a per tool basis.

I just want to make sure that setting keepBackup = false can be set on [mergetool], but not on [mergetool "yourtool"]

As far as I know this will work:

[mergetool]
    prompt = false
    keepBackup = false

But this won't:

[mergetool "semanticmerge"]
    cmd = C:/Users/pablo/AppData/Local/PlasticSCM4/semanticmerge/semanticmergetool.exe -d \"$LOCAL\" -s \"$REMOTE\" -b \"$BASE\" -r \"$MERGED\" -a
    trustExitCode = true
    **keepBackup = false**

It's correct?

Était-ce utile?

La solution

It seems that Charles Bailey introduced 5 years ago a global settings instead of a per-mergetool settings, in commit 44c36d (February 2008, git 1.5.5+).
It wasn't documented properly before commit d1cc46 (July 2010, git 1.7.1.2).

So a keepBackup in mergetool.xxx wouldn't be correct indeed.

That would be a good topic for patching git.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top