diff options
author | Samy Pesse <samypesse@gmail.com> | 2016-02-11 18:18:33 +0100 |
---|---|---|
committer | Samy Pesse <samypesse@gmail.com> | 2016-02-11 18:18:33 +0100 |
commit | e7eed2abbe91fa44bd071819123bd9ea04d1702a (patch) | |
tree | db6290eec86c94cb31ab8d2eeb26fa7145c6c09e /lib/utils/git.js | |
parent | 98a13cf487e3b2823cfde38ab1d1b8f97f614517 (diff) | |
download | gitbook-e7eed2abbe91fa44bd071819123bd9ea04d1702a.zip gitbook-e7eed2abbe91fa44bd071819123bd9ea04d1702a.tar.gz gitbook-e7eed2abbe91fa44bd071819123bd9ea04d1702a.tar.bz2 |
Complete conrefs in parsing
Diffstat (limited to 'lib/utils/git.js')
-rw-r--r-- | lib/utils/git.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/utils/git.js b/lib/utils/git.js index 9fca73f..baf0fab 100644 --- a/lib/utils/git.js +++ b/lib/utils/git.js @@ -51,6 +51,11 @@ Git.prototype.clone = function(host, ref) { // Get file from a git repo Git.prototype.resolve = function(giturl) { + // Path to a file in a git repo? + if (!Git.isUrl(giturl)) { + if (this.resolveRoot(giturl)) return Promise(giturl); + return Promise(null); + } if (_.isString(giturl)) giturl = Git.parseUrl(giturl); if (!giturl) return Promise(null); |