summaryrefslogtreecommitdiffstats
path: root/lib/utils/git.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-09-15 13:57:21 +0200
committerSamy Pessé <samypesse@gmail.com>2015-09-15 13:57:21 +0200
commit5a205346e3d125b1c834220ce98a206d88697811 (patch)
tree47700546d3b7a3e484975e37b1bb06e7efa88b92 /lib/utils/git.js
parente1930046599d430a6bb378af62bce78fb9d24ff7 (diff)
downloadgitbook-5a205346e3d125b1c834220ce98a206d88697811.zip
gitbook-5a205346e3d125b1c834220ce98a206d88697811.tar.gz
gitbook-5a205346e3d125b1c834220ce98a206d88697811.tar.bz2
Jshint all files
Diffstat (limited to 'lib/utils/git.js')
-rw-r--r--lib/utils/git.js8
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 = {