Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix cricial infinite loop bug

  • Loading branch information...
commit 242d1ba1ad69034ad04254a034c84b926ac03303 1 parent d36a9d2
@substack authored
Showing with 2 additions and 5 deletions.
  1. +1 −4 index.js
  2. +1 −1  package.json
View
5 index.js
@@ -249,12 +249,9 @@ Propagit.prototype.createService = function (remote, conn) {
if (typeof obj !== 'object') return;
obj.id = String(obj.id);
var ids = self.drones.map(function (d) { return d.id });
- if (ids.indexOf(obj.id) >= 0 && !/-\d+$/.test(obj.id)) {
- obj.id += '-1';
- }
while (ids.indexOf(obj.id) >= 0) {
- obj.id.replace(/(?:-(\d+))?$/, function (_, x) {
+ obj.id = obj.id.replace(/(?:-(\d+))?$/, function (_, x) {
return '-' + (parseInt(x || '0', 10) + 1);
});
}
View
2  package.json
@@ -1,7 +1,7 @@
{
"name" : "propagit",
"description" : "cascading multi-server git deployment",
- "version" : "0.6.3",
+ "version" : "0.6.4",
"repository" : {
"type" : "git",
"url" : "git://github.com/substack/propagit.git"
Please sign in to comment.
Something went wrong with that request. Please try again.