Skip to content

Commit 8260675

Browse files
committed
chore: reveiwed uncaught exception handlers in git
1 parent c293e4c commit 8260675

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/extensions/default/Git/src/dialogs/Pull.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
define(function (require, exports) {
22

33
// Brackets modules
4-
var Dialogs = brackets.getModule("widgets/Dialogs"),
4+
const Dialogs = brackets.getModule("widgets/Dialogs"),
55
Mustache = brackets.getModule("thirdparty/mustache/mustache");
66

77
// Local modules
8-
var Preferences = require("src/Preferences"),
8+
const Preferences = require("src/Preferences"),
99
RemoteCommon = require("src/dialogs/RemoteCommon"),
1010
Strings = brackets.getModule("strings");
1111

1212
// Templates
13-
var template = require("text!src/dialogs/templates/pull-dialog.html"),
13+
const template = require("text!src/dialogs/templates/pull-dialog.html"),
1414
remotesTemplate = require("text!src/dialogs/templates/remotes-template.html");
1515

1616
// Implementation
@@ -54,6 +54,7 @@ define(function (require, exports) {
5454
function show(pullConfig) {
5555
return new Promise((resolve, reject) => {
5656
pullConfig.pull = true;
57+
// collectInfo never rejects
5758
RemoteCommon.collectInfo(pullConfig).then(()=>{
5859
_show(pullConfig, resolve, reject);
5960
});

src/extensions/default/Git/src/dialogs/Push.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ define(function (require, exports) {
5252
function show(pushConfig) {
5353
return new Promise((resolve, reject) => {
5454
pushConfig.push = true;
55+
// collectInfo never rejects
5556
RemoteCommon.collectInfo(pushConfig).then(()=>{
5657
_show(pushConfig, resolve, reject);
5758
});

src/extensions/default/Git/src/dialogs/RemoteCommon.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ define(function (require, exports) {
2828
});
2929
}
3030

31+
// this should never reject for now, just show error message and bail out
3132
exports.collectInfo = function (config) {
3233
return Git.getCurrentUpstreamBranch().then(function (upstreamBranch) {
3334
config.currentTrackingBranch = upstreamBranch;

0 commit comments

Comments
 (0)