MCPcopy Index your code
hub / github.com/nodegit/nodegit / removeNonOrigins

Function removeNonOrigins

test/tests/remote.js:23–36  ·  view source on GitHub ↗
(repo)

Source from the content-addressed store, hash-verified

21 var privateUrl = "git@github.com:nodegit/private";
22
23 function removeNonOrigins(repo) {
24 return repo.getRemoteNames()
25 .then(function(remotes) {
26 return remotes.reduce(function(promise, remote) {
27 if (remote !== "origin") {
28 promise = promise.then(function() {
29 return Remote.delete(repo, remote);
30 });
31 }
32
33 return promise;
34 }, Promise.resolve());
35 });
36 }
37
38 beforeEach(function() {
39 var test = this;

Callers 1

remote.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…