refactor: replace all master to main

This commit is contained in:
Anh Hồng 2021-04-19 09:51:20 +07:00
parent 4148f0b846
commit b7ac2851c6
55 changed files with 431 additions and 455 deletions

View file

@ -11,12 +11,12 @@ TreeCompare.dispatchFromLevel = function(levelBlob, treeToCompare) {
return TreeCompare.dispatch(levelBlob, goalTreeString, treeToCompare);
};
TreeCompare.onlyMasterCompared = function(levelBlob) {
TreeCompare.onlyMainCompared = function(levelBlob) {
var getAroundLintTrue = true;
switch (getAroundLintTrue) {
case !!levelBlob.compareOnlyMaster:
case !!levelBlob.compareOnlyMasterHashAgnostic:
case !!levelBlob.compareOnlyMasterHashAgnosticWithAsserts:
case !!levelBlob.compareOnlyMain:
case !!levelBlob.compareOnlyMainHashAgnostic:
case !!levelBlob.compareOnlyMainHashAgnosticWithAsserts:
return true;
default:
return false;
@ -50,9 +50,9 @@ TreeCompare.dispatchShallow = function(levelBlob, goalTreeString, treeToCompare)
var getAroundLintTrue = true;
// i actually prefer this to else if
switch (getAroundLintTrue) {
case !!levelBlob.compareOnlyMaster:
case !!levelBlob.compareOnlyMain:
return TreeCompare.compareBranchWithinTrees(
treeToCompare, goalTreeString, 'master'
treeToCompare, goalTreeString, 'main'
);
case !!levelBlob.compareAllBranchesAndEnforceBranchCleanup:
return TreeCompare.compareAllBranchesAndEnforceBranchCleanup(
@ -66,13 +66,13 @@ TreeCompare.dispatchShallow = function(levelBlob, goalTreeString, treeToCompare)
return TreeCompare.compareAllBranchesWithinTreesHashAgnostic(
treeToCompare, goalTreeString
);
case !!levelBlob.compareOnlyMasterHashAgnostic:
case !!levelBlob.compareOnlyMainHashAgnostic:
return TreeCompare.compareBranchesWithinTreesHashAgnostic(
treeToCompare, goalTreeString, ['master']
treeToCompare, goalTreeString, ['main']
);
case !!levelBlob.compareOnlyMasterHashAgnosticWithAsserts:
case !!levelBlob.compareOnlyMainHashAgnosticWithAsserts:
return TreeCompare.compareBranchesWithinTreesHashAgnostic(
treeToCompare, goalTreeString, ['master']
treeToCompare, goalTreeString, ['main']
) && TreeCompare.evalAsserts(treeToCompare, levelBlob.goalAsserts);
default:
return TreeCompare.compareAllBranchesWithinTreesAndHEAD(
@ -98,7 +98,7 @@ TreeCompare.compareAllBranchesAndEnforceBranchCleanup = function(treeToCompare,
// Unlike compareAllBranchesWithinTrees, here we consider both the branches
// in the goalTree and the branches in the treeToCompare. This means that
// we enfoce that you clean up any branches that you have locally that
// we enforce that you clean up any branches that you have locally that
// the goal does not have. this is helpful when we want to verify that you
// have deleted branch, for instance.
var allBranches = Object.assign(