MCPcopy
hub / github.com/jisaacks/GitGutter / git_binary

Method git_binary

modules/settings.py:140–158  ·  view source on GitHub ↗

Return the git executable path from settings or just 'git'. Try to get the absolute git executable path from any of the settings files (view/project/user/gitgutter). If none is set just return 'git' and let subprocess.POpen use the PATH environment variable to find the

(self)

Source from the content-addressed store, hash-verified

138
139 @property
140 def git_binary(self):
141 """Return the git executable path from settings or just 'git'.
142
143 Try to get the absolute git executable path from any of the settings
144 files (view/project/user/gitgutter). If none is set just return 'git'
145 and let subprocess.POpen use the PATH environment variable to find the
146 executable path on its own.
147
148 Returns:
149 string: Absolute path of the git executable from settings or 'git'.
150 """
151 value = self._settings.get('git_binary')
152 if value is None:
153 value = get('git_binary')
154 if isinstance(value, dict):
155 git_binary = value.get(PLATFORM) or value.get('default')
156 else:
157 git_binary = value
158 return os.path.expandvars(git_binary) if git_binary else 'git'
159
160 @property
161 def ignore_whitespace(self):

Callers

nothing calls this directly

Calls 2

getFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected