mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 16:38:50 +02:00
Resolves #778
This commit is contained in:
parent
8b69d00880
commit
ddb3dc93ca
1 changed files with 9 additions and 2 deletions
|
@ -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/)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue