Skip to content
This repository was archived by the owner on Apr 3, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/git-control.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,8 @@ module.exports = GitControl =
description: 'Disable Fast Forward for default at Git Merge'
type: 'boolean'
default: false
gitCustomPath:
title: 'Git path'
description: 'Git executable location for custom installation'
type: 'string'
default: ''
7 changes: 6 additions & 1 deletion lib/git.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ parseDefault = (data) -> q.fcall ->
callGit = (cmd, parser, nodatalog) ->
logcb "> git #{cmd}"

return git(cmd, {cwd: cwd})
options = {cwd: cwd}
customPath = atom.config.get("git-control.gitCustomPath")
if customPath
options.gitExec = customPath

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't work (at least on windows) for paths with a space in it. This could be solved by adding a " before and after the custom path (so options.gitExec = '"' + customPath + '"').


return git(cmd, options)
.then (data) ->
logcb data unless nodatalog
return parser(data)
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"atom": ">0.50.0"
},
"dependencies": {
"git-promise": "^0.2.0",
"git-promise": "^0.3.1",
"q": "^1.0.1",
"atom-space-pen-views": "^2.0.3"
},
Expand Down Expand Up @@ -126,7 +126,7 @@
},
{
"name": "git-promise",
"version": "0.2.0",
"version": "0.3.1",
"path": "node_modules/git-promise/index.js"
},
{
Expand Down Expand Up @@ -771,7 +771,7 @@
"spec"
],
"dependencies": {
"git-promise": "^0.2.0",
"git-promise": "^0.3.1",
"q": "^1.0.1",
"atom-space-pen-views": "^2.0.3"
}
Expand Down