diff options
Diffstat (limited to 'lib/utils/git.js')
-rw-r--r-- | lib/utils/git.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/utils/git.js b/lib/utils/git.js index 6eb9681..e93c8f2 100644 --- a/lib/utils/git.js +++ b/lib/utils/git.js @@ -1,7 +1,5 @@ var Q = require("q"); var _ = require("lodash"); -var url = require("url"); -var tmp = require("tmp"); var path = require("path"); var crc = require("crc"); var exec = Q.denodeify(require("child_process").exec); @@ -102,11 +100,11 @@ function resolveFileFromGit(giturl) { // Resolve relative path return path.resolve(repo, giturl.filepath); }); -}; +} // Return root of git repo from a filepath function resolveGitRoot(filepath) { - var relativeToGit, repoId + var relativeToGit, repoId; // No git repo cloned, or file is not in a git repository if (!GIT_TMP || !pathUtil.isInRoot(GIT_TMP, filepath)) return null; @@ -118,7 +116,7 @@ function resolveGitRoot(filepath) { // Return an absolute file return path.resolve(GIT_TMP, repoId); -}; +} module.exports = { |