Skip to content
Browse files

Fixed wrong git update-ref for persistent refs.

Fixed useless uses of replace().
  • Loading branch information...
1 parent 27d8075 commit 894cf8c1133aaa41516043e6c03b5c5845db6576 Rohan McGovern committed Apr 20, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/gitproxy.js
View
3 src/gitproxy.js
@@ -539,7 +539,8 @@ GitProxy.prototype.updateRefs = function () {
refs.push('refs/in-progress/' + client_id + '/' + server_ref);
persistent_ref = 'refs/persistent/' + this.server.host + '/' + this.server.repo + '/' + server_ref;
- persistent_ref.replace(/[^A-Za-z0-9\/\-_\.]/, '-');
+ persistent_ref = persistent_ref.replace(/[^A-Za-z0-9\/\-_\.]/g, '-');
+ persistent_ref = persistent_ref.replace(/\/+/g, '/');
refs.push(persistent_ref);
for (i = 0; i < refs.length; ++i) {

0 comments on commit 894cf8c

Please sign in to comment.
Something went wrong with that request. Please try again.