Skip to content

Commit

Permalink
Update packages/mermaid/src/diagrams/git/gitGraphAst.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Sidharth Vinod <github@sidharth.dev>
  • Loading branch information
Austin-Fulbright and sidharthv96 authored Jul 27, 2024
1 parent e57fee1 commit 62757c5
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions packages/mermaid/src/diagrams/git/gitGraphAst.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,33 +44,6 @@ function getID() {
return random({ length: 7 });
}

// function isFastForwardable(currentCommit, otherCommit) {
// log.debug('Entering isFastForwardable:', currentCommit.id, otherCommit.id);
// let cnt = 0;
// while (currentCommit.seq <= otherCommit.seq && currentCommit !== otherCommit && cnt < 1000) {
// cnt++;
// // only if other branch has more commits
// if (otherCommit.parent == null) break;
// if (Array.isArray(otherCommit.parent)) {
// log.debug('In merge commit:', otherCommit.parent);
// return (
// isFastForwardable(currentCommit, commits.get(otherCommit.parent[0])) ||
// isFastForwardable(currentCommit, commits.get(otherCommit.parent[1]))
// );
// } else {
// otherCommit = commits.get(otherCommit.parent);
// }
// }
// log.debug(currentCommit.id, otherCommit.id);
// return currentCommit.id === otherCommit.id;
// }

// function isReachableFrom(currentCommit, otherCommit) {
// const currentSeq = currentCommit.seq;
// const otherSeq = otherCommit.seq;
// if (currentSeq > otherSeq) return isFastForwardable(otherCommit, currentCommit);
// return false;
// }

/**
* @param list - list of items
Expand Down

0 comments on commit 62757c5

Please sign in to comment.