1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Add git_pull_unrelated_history handling

This commit is contained in:
Nick O'Leary 2018-02-01 17:07:46 +00:00
parent 750dd590c8
commit 407123a280
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
2 changed files with 5 additions and 0 deletions

View File

@ -894,6 +894,9 @@ RED.sidebar.versionControl = (function() {
'unexpected_error': function(error) { 'unexpected_error': function(error) {
console.log(error); console.log(error);
// done(error,null); // done(error,null);
},
'git_pull_unrelated_history': function(error) {
RED.notify("Unable to pull remote changes; refusing to merge unrelated histories.","error");
} }
}, },
} }

View File

@ -67,6 +67,8 @@ function runGitCommand(args,cwd,env) {
err.code = "git_not_a_repository"; err.code = "git_not_a_repository";
} else if (/Repository not found/i.test(stderr)) { } else if (/Repository not found/i.test(stderr)) {
err.code = "git_repository_not_found"; err.code = "git_repository_not_found";
} else if (/refusing to merge unrelated histories/.test(stderr)) {
err.code = "git_pull_unrelated_history"
} }
return reject(err); return reject(err);
} }