mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-24 06:58:34 +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
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue