Comparing version 0.2.4 to 0.2.5
@@ -42,2 +42,3 @@ var fs = require('fs'); | ||
var depth = options.depth || -1; | ||
var verbose = 'verbose' in options ? options.verbose : false; | ||
var girrorfile = 'girrorfile' in options ? options.girrorfile : '.girror.json'; | ||
@@ -50,2 +51,7 @@ | ||
if (!verbose) { | ||
logger.log = function() { }; | ||
logger.info = function() { }; | ||
} | ||
// -- private | ||
@@ -52,0 +58,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"description": "Efficient mirror of git repositories. Great for continuous deployment", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
@@ -20,7 +20,13 @@ # girror - Efficient mirroring of git remotes # | ||
1. Initializes a bare repo under `/tmp/girror-cache` (or `$TEMP/girror-cache` in Windows) based on the origin URL. | ||
2. `git remote add --mirror=fetch <remote>` (tolerate failures) | ||
3. `git fetch origin` | ||
4. `git --work-tree <worktree> checkout -f <branch>` | ||
``` | ||
git init --bare # idempotent | ||
git remote add --mirror=fetch <remote> # tolerate failures | ||
git fetch origin | ||
git --work-tree <worktree> checkout -f <branch> | ||
``` | ||
The bare repository will be created in a directory under `/tmp/girror-cache` (or `$TEMP/girror-cache` in Windows). | ||
The name of the directory is based on the remote URL (mangled). | ||
If `GIRROR_CACHE` environment variable is defined, it will be used as the cache root. | ||
_girror_ can be used as a command line tool or as a node.js in-process module. | ||
@@ -70,2 +76,3 @@ | ||
* `options.depth`: defines the clone depth (-1 indicates infinite). Default is -1. | ||
* `options.verbose`: outputs git & girror verbose into logger. Default is `false`. | ||
@@ -72,0 +79,0 @@ ### girror.git(args, options, callback) ### |
Sorry, the diff of this file is not supported yet
41145
383
110