mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 08:28:50 +02:00
better tree comparsion from Issue #28
This commit is contained in:
parent
2a96052002
commit
bf6432b286
9 changed files with 84 additions and 36 deletions
|
@ -289,6 +289,7 @@ var Level = Sandbox.extend({
|
|||
return;
|
||||
}
|
||||
|
||||
// TODO refactor this ugly ass switch statement...
|
||||
// ok so lets see if they solved it...
|
||||
var current = this.mainVis.gitEngine.exportTree();
|
||||
var solved;
|
||||
|
@ -296,6 +297,10 @@ var Level = Sandbox.extend({
|
|||
solved = this.treeCompare.compareBranchWithinTrees(current, this.level.goalTreeString, 'master');
|
||||
} else if (this.level.compareOnlyBranches) {
|
||||
solved = this.treeCompare.compareAllBranchesWithinTrees(current, this.level.goalTreeString);
|
||||
} else if (this.level.compareAllBranchesHashAgnostic) {
|
||||
solved = this.treeCompare.compareAllBranchesWithinTreesHashAgnostic(current, this.level.goalTreeString);
|
||||
} else if (this.level.compareOnlyMasterHashAgnostic) {
|
||||
solved = this.treeCompare.compareBranchesWithinTreesHashAgnostic(current, this.level.goalTreeString, ['master']);
|
||||
} else {
|
||||
solved = this.treeCompare.compareAllBranchesWithinTreesAndHEAD(current, this.level.goalTreeString);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue