diff --git a/src/js/git/index.js b/src/js/git/index.js index 1260084b..bd5791c9 100644 --- a/src/js/git/index.js +++ b/src/js/git/index.js @@ -480,9 +480,9 @@ GitEngine.prototype.setLocalToTrackRemote = function(localBranch, remoteBranch) } var msg = 'local branch "' + - localBranch.get('id') + + this.postProcessBranchID(localBranch.get('id')) + '" set to track remote branch "' + - remoteBranch.get('id') + + this.postProcessBranchID(remoteBranch.get('id')) + '"'; this.command.addWarning(intl.todo(msg)); }; @@ -694,6 +694,13 @@ GitEngine.prototype.validateAndMakeTag = function(id, target) { this.makeTag(id, target); }; +GitEngine.prototype.postProcessBranchID = function(id) { + if (id.match(/\bmaster\b/)) { + id = id.replace(/\bmaster\b/, 'main'); + } + return id; +} + GitEngine.prototype.makeBranch = function(id, target) { // all main branches are stored as master under the hood if (id.match(/\bmain\b/)) {