Permalink
Browse files

Repo name: If repo does not end with .git - then add .git to the repo…

… name
  • Loading branch information...
1 parent 876a64e commit 12e37708b5640d1bc37745d1c42d7a7851b1db8d @MRdNk MRdNk committed Mar 17, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 index.js
View
@@ -41,6 +41,9 @@ Git.prototype.create = function (repo, cb) {
var self = this;
if (typeof cb !== 'function') cb = function () {};
var cwd = process.cwd();
+
+ if (repo.substring(repo.length -3, 3) !== 'git')
+ repo = repo + '.git'
self.exists(repo, function (ex) {
if (!ex) self.mkdir(repo, next)

0 comments on commit 12e3770

Please sign in to comment.