Is it possible to set Path to Git executable in plugin

Answered

I dynamically obtain path to git executable. Is it possible to read/set value from within plugin?

3 comments
Comment actions Permalink

You can use 

GitVcsApplicationSettings.getInstance().setPathToGit(...); // application settings
GitVcsSettings.getInstance(project).setPathToGit(...); // per-project settings

You will need to depend on Git4Idea plugin to do this.
See https://www.jetbrains.org/intellij/sdk/docs/basics/plugin_structure/plugin_dependencies.html

0
Comment actions Permalink

Thank you. It works :-)

0
Comment actions Permalink

Hi Jesper,

please, can You show me how You programmatically obtained the path to git executable ?

For a plugin I'm developing I need the same but I cannot see how ....

Thanks,

Marco

0

Please sign in to leave a comment.