I want to use the equivalent of "git mergetool" within libgit2sharp. Is there a sample to do this? Or do I have to dive deep and try to implement this in libgit2sharp?
The call "git mergetool" checks if merge is required and calls the custom mergetool with a copy of the server. A proper way to call the mergetool would be usefull. I know I can read the config and search the mergetool and its "cmd" command.
Greetings Thomas
LibGit2Sharp is used to programmatically interact with a git repository. It won't launch a mergetool directly.
However, you can use LibGit2Sharp to retrieve the configuration values from a given repository. For instance, by using:
var mergeTool = repo.Config.Get<string>("merge.tool").Value;
var path = repo.Config.Get<string>("mergetool." + mergeTool + ".path").Value;
You can retrieve the path of the configured merge tool.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With