Permalink
Browse files

better use of libpath

  • Loading branch information...
1 parent 1c965b6 commit 01491bb579dc143d93814a38e641b549fd906703 @drewfish committed Apr 8, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/scm-git.js
View
@@ -43,8 +43,7 @@ SCMGit.prototype.init = function(target) {
parts = target.split('/');
parts.shift(); // empty part before the first slash
for (i = parts.length; i > 0; i--) {
- // TODO -- use libpath
- path = '/' + parts.slice(0, i).join('/');
+ path = '/' + libpath.join.apply(libpath.join, parts.slice(0, i));
repo = libpath.join(path, '.git');
if (libpath.existsSync(repo)) {
this.target = target;

0 comments on commit 01491bb

Please sign in to comment.