The path of the working directory is accessible by git. Windows Subsystem for Linux automatically maps local drive letters to /mnt only. UNC paths would need to be mounted manually, which is not supported by GitGutter at the moment. Returns: bool:
(self)
| 191 | return self._git_tree |
| 192 | |
| 193 | def work_tree_supported(self): |
| 194 | """The path of the working directory is accessible by git. |
| 195 | |
| 196 | Windows Subsystem for Linux automatically maps local drive letters to |
| 197 | /mnt only. UNC paths would need to be mounted manually, which is not |
| 198 | supported by GitGutter at the moment. |
| 199 | |
| 200 | Returns: |
| 201 | bool: |
| 202 | True if not running in WSL mode or path is a local drive |
| 203 | False if the working tree is no local drive in WSL mode. |
| 204 | """ |
| 205 | return not self._git_wsl or self._git_tree and self._git_tree[1] == ':' |
| 206 | |
| 207 | def translate_path_to_wsl(self, filename): |
| 208 | """Translate filename to a WSL compatible unix path on demand. |