mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-08-02 00:54:40 +02:00
refactor: replace all master to main
This commit is contained in:
parent
4148f0b846
commit
b7ac2851c6
55 changed files with 431 additions and 455 deletions
|
@ -68,7 +68,7 @@ var VisBranch = VisBase.extend({
|
|||
this.refreshOffset();
|
||||
|
||||
this.set('fill', GRAPHICS.headRectFill);
|
||||
} else if (id !== 'master') {
|
||||
} else if (id !== 'main') {
|
||||
// we need to set our color to something random
|
||||
this.set('fill', randomHueString());
|
||||
}
|
||||
|
@ -103,16 +103,16 @@ var VisBranch = VisBase.extend({
|
|||
* compared in the goal (used in a goal visualization context
|
||||
*/
|
||||
getIsLevelBranchCompared: function() {
|
||||
if (this.getIsMaster()) {
|
||||
return true; // master always compared
|
||||
if (this.getIsMain()) {
|
||||
return true; // main always compared
|
||||
}
|
||||
// we are not master, so return true if its not just master being compared
|
||||
// we are not main, so return true if its not just main being compared
|
||||
var levelBlob = this.get('gitVisuals').getLevelBlob();
|
||||
return !TreeCompare.onlyMasterCompared(levelBlob);
|
||||
return !TreeCompare.onlyMainCompared(levelBlob);
|
||||
},
|
||||
|
||||
getIsMaster: function() {
|
||||
return this.get('branch').get('id') == 'master';
|
||||
getIsMain: function() {
|
||||
return this.get('branch').get('id') == 'main';
|
||||
},
|
||||
|
||||
getFlipValue: function(commit, visNode) {
|
||||
|
@ -357,9 +357,6 @@ var VisBranch = VisBase.extend({
|
|||
if (name === 'HEAD' && isHg) {
|
||||
name = '.';
|
||||
}
|
||||
if (name.match(/\bmaster\b/)) {
|
||||
name = name.replace(/\bmaster\b/, 'main');
|
||||
}
|
||||
|
||||
var after = (selected && !this.getIsInOrigin() && !isRemote) ? '*' : '';
|
||||
return name + after;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue