From 62757c529ff65f9694252855f3655e86c07fb107 Mon Sep 17 00:00:00 2001 From: Austin-Fulbright <53443958+Austin-Fulbright@users.noreply.github.com> Date: Sat, 27 Jul 2024 04:02:56 -0400 Subject: [PATCH] Update packages/mermaid/src/diagrams/git/gitGraphAst.ts Co-authored-by: Sidharth Vinod --- .../mermaid/src/diagrams/git/gitGraphAst.ts | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/packages/mermaid/src/diagrams/git/gitGraphAst.ts b/packages/mermaid/src/diagrams/git/gitGraphAst.ts index 8ce891261a..2f29a45319 100644 --- a/packages/mermaid/src/diagrams/git/gitGraphAst.ts +++ b/packages/mermaid/src/diagrams/git/gitGraphAst.ts @@ -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