mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 16:38:50 +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
|
@ -160,7 +160,7 @@ var Graph = {
|
|||
},
|
||||
|
||||
getDefaultTree: function() {
|
||||
return JSON.parse(unescape("%7B%22branches%22%3A%7B%22master%22%3A%7B%22target%22%3A%22C1%22%2C%22id%22%3A%22master%22%2C%22type%22%3A%22branch%22%7D%7D%2C%22commits%22%3A%7B%22C0%22%3A%7B%22type%22%3A%22commit%22%2C%22parents%22%3A%5B%5D%2C%22author%22%3A%22Peter%20Cottle%22%2C%22createTime%22%3A%22Mon%20Nov%2005%202012%2000%3A56%3A47%20GMT-0800%20%28PST%29%22%2C%22commitMessage%22%3A%22Quick%20Commit.%20Go%20Bears%21%22%2C%22id%22%3A%22C0%22%2C%22rootCommit%22%3Atrue%7D%2C%22C1%22%3A%7B%22type%22%3A%22commit%22%2C%22parents%22%3A%5B%22C0%22%5D%2C%22author%22%3A%22Peter%20Cottle%22%2C%22createTime%22%3A%22Mon%20Nov%2005%202012%2000%3A56%3A47%20GMT-0800%20%28PST%29%22%2C%22commitMessage%22%3A%22Quick%20Commit.%20Go%20Bears%21%22%2C%22id%22%3A%22C1%22%7D%7D%2C%22HEAD%22%3A%7B%22id%22%3A%22HEAD%22%2C%22target%22%3A%22master%22%2C%22type%22%3A%22general%20ref%22%7D%7D"));
|
||||
return JSON.parse(unescape("%7B%22branches%22%3A%7B%22main%22%3A%7B%22target%22%3A%22C1%22%2C%22id%22%3A%22main%22%2C%22type%22%3A%22branch%22%7D%7D%2C%22commits%22%3A%7B%22C0%22%3A%7B%22type%22%3A%22commit%22%2C%22parents%22%3A%5B%5D%2C%22author%22%3A%22Peter%20Cottle%22%2C%22createTime%22%3A%22Mon%20Nov%2005%202012%2000%3A56%3A47%20GMT-0800%20%28PST%29%22%2C%22commitMessage%22%3A%22Quick%20Commit.%20Go%20Bears%21%22%2C%22id%22%3A%22C0%22%2C%22rootCommit%22%3Atrue%7D%2C%22C1%22%3A%7B%22type%22%3A%22commit%22%2C%22parents%22%3A%5B%22C0%22%5D%2C%22author%22%3A%22Peter%20Cottle%22%2C%22createTime%22%3A%22Mon%20Nov%2005%202012%2000%3A56%3A47%20GMT-0800%20%28PST%29%22%2C%22commitMessage%22%3A%22Quick%20Commit.%20Go%20Bears%21%22%2C%22id%22%3A%22C1%22%7D%7D%2C%22HEAD%22%3A%7B%22id%22%3A%22HEAD%22%2C%22target%22%3A%22main%22%2C%22type%22%3A%22general%20ref%22%7D%7D"));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -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