mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Handle a local branch that does not yet track a remote
This commit is contained in:
@@ -883,16 +883,32 @@ RED.projects = (function() {
|
||||
} else {
|
||||
branchPrefix = "";
|
||||
}
|
||||
$.getJSON(url,function(result) {
|
||||
branches = result.branches;
|
||||
result.branches.forEach(function(b) {
|
||||
branchList.editableList('addItem',b);
|
||||
});
|
||||
branchList.editableList('addItem',{});
|
||||
setTimeout(function() {
|
||||
spinner.remove();
|
||||
},Math.max(300-(Date.now() - start),0));
|
||||
});
|
||||
|
||||
|
||||
sendRequest({
|
||||
url: url,
|
||||
type: "GET",
|
||||
responses: {
|
||||
0: function(error) {
|
||||
console.log(error);
|
||||
},
|
||||
200: function(result) {
|
||||
branches = result.branches;
|
||||
result.branches.forEach(function(b) {
|
||||
branchList.editableList('addItem',b);
|
||||
});
|
||||
branchList.editableList('addItem',{});
|
||||
setTimeout(function() {
|
||||
spinner.remove();
|
||||
},Math.max(300-(Date.now() - start),0));
|
||||
},
|
||||
400: {
|
||||
'unexpected_error': function(error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
addItem: function(data) { branchList.editableList('addItem',data) },
|
||||
filter: function() { branchList.editableList('filter') },
|
||||
|
Reference in New Issue
Block a user