Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bug 526731 - Submodule error trying to clone fork
  • Loading branch information
squarti committed Nov 28, 2017
1 parent 5d94da6 commit d21e483
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion modules/orionode/lib/git/clone.js
Expand Up @@ -256,6 +256,10 @@ function getClones(req, res, callback) {
git.Submodule.lookup(repo, name)
.then(function(submodule) {
theSubmodule = submodule;
if (!submodule.url()) {
freeRepo(theSubmodule);
return callback();
}
var status, subrepo;
var sublocation = api.join(location, submodule.path());
function done(json, unitialized) {
Expand Down Expand Up @@ -590,6 +594,9 @@ function foreachSubmodule(repo, operation, recursive, creds, username, task) {
git.Submodule.lookup(repo, name)
.then(function(submodule) {
theSubmodule = submodule;
if (!submodule.url()) {
return;
}
var op;
if (operation === "sync") {
op = submodule.sync();
Expand Down Expand Up @@ -702,7 +709,7 @@ function handleRemoteError(task, err, cloneUrl) {
fullCloneUrl = "ssh://" + cloneUrl;
}
var u = url.parse(fullCloneUrl, true);
var code = err.code || 403;
var code = err.code || 500;
var jsonData, message = err.message;
if (err.message && ["credentials", "authentication", "401"].some(function(s) { return err.message.indexOf(s) !== -1; })) {
code = 401;
Expand Down

0 comments on commit d21e483

Please sign in to comment.