This commit is contained in:
Peter Cottle 2021-01-11 12:30:35 -07:00
parent 8b69d00880
commit ddb3dc93ca

View file

@ -480,9 +480,9 @@ GitEngine.prototype.setLocalToTrackRemote = function(localBranch, remoteBranch)
} }
var msg = 'local branch "' + var msg = 'local branch "' +
localBranch.get('id') + this.postProcessBranchID(localBranch.get('id')) +
'" set to track remote branch "' + '" set to track remote branch "' +
remoteBranch.get('id') + this.postProcessBranchID(remoteBranch.get('id')) +
'"'; '"';
this.command.addWarning(intl.todo(msg)); this.command.addWarning(intl.todo(msg));
}; };
@ -694,6 +694,13 @@ GitEngine.prototype.validateAndMakeTag = function(id, target) {
this.makeTag(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) { GitEngine.prototype.makeBranch = function(id, target) {
// all main branches are stored as master under the hood // all main branches are stored as master under the hood
if (id.match(/\bmain\b/)) { if (id.match(/\bmain\b/)) {