Skip to content
This repository

Added `create` event. #5

Open
wants to merge 1 commit into from

1 participant

Samori Gorse
Samori Gorse

No description provided.

Samori Gorse

Any chance to get this merged?

Samori Gorse shinuza referenced this pull request in shinuza/pushhub
Closed

Use watch to monitor new repository creation #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Mar 07, 2012
Samori Gorse shinuza Added `create` event. bde5942
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. +2 1  index.js
3  index.js
@@ -43,6 +43,7 @@ Git.prototype.exists = function (repo, cb) {
43 43 };
44 44
45 45 Git.prototype.create = function (repo, cb) {
  46 + var self = this;
46 47 var cwd = process.cwd();
47 48 var dir = path.join(this.repoDir, repo);
48 49 if (this.checkout) {
@@ -57,7 +58,7 @@ Git.prototype.create = function (repo, cb) {
57 58 ps.on('exit', function (code) {
58 59 if (!cb) {}
59 60 else if (code) cb(err || true)
60   - else cb(null)
  61 + else { self.emit('create', dir); cb(null) }
61 62 });
62 63 };
63 64

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.