mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-24 23:18:35 +02:00
awesome tree compare coverage for tests, no bugs found though
This commit is contained in:
parent
1a846bbad3
commit
6e75e04daf
7 changed files with 15 additions and 55 deletions
|
@ -9,7 +9,9 @@ TreeCompare.dispatchFromLevel = function(levelBlob, treeToCompare) {
|
|||
};
|
||||
|
||||
TreeCompare.dispatch = function(levelBlob, goalTreeString, treeToCompare) {
|
||||
switch(true) {
|
||||
var getAroundLintTrue = true;
|
||||
// i actually prefer this to else if
|
||||
switch (getAroundLintTrue) {
|
||||
case !!levelBlob.compareOnlyMaster:
|
||||
return TreeCompare.compareBranchWithinTrees(treeToCompare, goalTreeString, 'master');
|
||||
case !!levelBlob.compareOnlyBranches:
|
||||
|
@ -151,7 +153,6 @@ TreeCompare.evalAssertsOnBranch = function(tree, branchName, asserts) {
|
|||
while (queue.length) {
|
||||
var commitRef = queue.pop();
|
||||
data[this.getBaseRef(commitRef)] = this.getNumHashes(commitRef);
|
||||
|
||||
queue = queue.concat(tree.commits[commitRef].parents);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue