Skip to content

Commit

Permalink
Do not remove remote
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
eladb committed May 2, 2012
1 parent 7bd5ac9 commit d9892ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/girror.js
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -2,7 +2,7 @@
"author": "Elad Ben-Israel <elad.benisrael@gmail.com>",
"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"
Expand Down

0 comments on commit d9892ae

Please sign in to comment.