From d9892ae83f5a6a1381925225f381ecd40008f58a Mon Sep 17 00:00:00 2001 From: Elad Ben-Israel Date: Wed, 2 May 2012 17:44:35 +0300 Subject: [PATCH] Do not remove remote In order for girror to support concurrency, removed the `git remote rm` command from girror. This means that if someone giggled with the remote _manually_, things might not work well. However, since the git repositories are managed in a private cached maintained by girror and keyed by a _mangled remote url_, i suspect this is not really important and being concurrency-safe is a more imporant feature. --- lib/girror.js | 3 +-- package.json | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/girror.js b/lib/girror.js index 033e14c..48ce2c3 100644 --- a/lib/girror.js +++ b/lib/girror.js @@ -173,8 +173,7 @@ function girror(remote, worktree, options, callback) { // git remote rm/add origin $log('setting up remote origin to ' + remote), - $git(dirpath, ['remote', 'rm', 'origin'], true), // ignore errors (in case doesn't exist) - $git(dirpath, ['remote', 'add', 'origin', '--mirror=fetch', remote]), + $git(dirpath, ['remote', 'add', 'origin', '--mirror=fetch', remote], true), // ignore errors (in case remote already exist) // git fetch origin $log('fetching updates from ' + remote), diff --git a/package.json b/package.json index 215aaf8..9a1ec8a 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Elad Ben-Israel ", "name": "girror", "description": "Efficient mirror of git repositories. Great for continuous deployment", - "version": "0.2.3", + "version": "0.2.4", "repository": { "type": "git", "url": "https://github.com/eladb/node-girror"