@@ -1376,6 +1376,7 @@ async function extendCommitsWithBranchEnds(
13761376 const removeRemoteRegex = / ^ r e f s \/ r e m o t e s \/ [ ^ / ] * \/ / ;
13771377
13781378 const currentBranchCommit : Git . Oid = await referenceToOid ( currentBranch ) ;
1379+ noop ( currentBranchCommit ) ;
13791380
13801381 const extend = ( c : Git . Commit , i : number ) : CommitAndBranchBoundary => (
13811382 ( matchedRefs = refs . filter ( ( ref ) => ! ! ref . target ( ) ?. equal ( c . id ( ) ) ) ) ,
@@ -1407,35 +1408,36 @@ async function extendCommitsWithBranchEnds(
14071408 . map ( ( ref ) => ref . name ( ) . replace ( removeLocalRegex , "" ) )
14081409 . includes ( r . name ( ) . replace ( removeRemoteRegex , "" ) )
14091410 ) ) ,
1410- assert (
1411- matchedRefs . length <= 1 ||
1412- /**
1413- * if it's more than 1,
1414- * it's only allowed if all of the branches are the same ones,
1415- * just on different remotes.
1416- */
1417- ( matchedRefs . length > 1 &&
1418- uniq (
1419- matchedRefs . map ( ( r ) =>
1420- r
1421- ?. name ( )
1422- . replace ( removeLocalRegex , "" )
1423- . replace ( removeRemoteRegex , "" )
1424- )
1425- ) . length === 1 ) ,
1426- // ||
1427- // /**
1428- // * or, if it's the root branch
1429- // */
1430- // !c.id().cmp(currentBranchCommit),
1431- "" +
1432- "2 (or more) branches for the same commit, both in the same path - cannot continue" +
1433- "(until explicit branch specifying is implemented)" +
1434- "\n\n" +
1435- "matchedRefs = " +
1436- matchedRefs . map ( ( mr ) => mr ?. name ( ) ) +
1437- "\n"
1438- ) ,
1411+ // assert(
1412+ // matchedRefs.length <= 1 ||
1413+ // /**
1414+ // * if it's more than 1,
1415+ // * it's only allowed if all of the branches are the same ones,
1416+ // * just on different remotes.
1417+ // */
1418+ // (matchedRefs.length > 1 &&
1419+ // uniq(
1420+ // matchedRefs.map((r) =>
1421+ // r
1422+ // ?.name()
1423+ // .replace(removeLocalRegex, "")
1424+ // .replace(removeRemoteRegex, "")
1425+ // )
1426+ // ).length === 1),
1427+ // // ||
1428+ // // /**
1429+ // // * or, if it's the root branch
1430+ // // */
1431+ // // !c.id().cmp(currentBranchCommit),
1432+ // "" +
1433+ // "2 (or more) branches for the same commit, both in the same path - cannot continue" +
1434+ // "(until explicit branch specifying is implemented)" +
1435+ // "\n\n" +
1436+ // "matchedRefs = " +
1437+ // matchedRefs.map((mr) => mr?.name()) +
1438+ // "\n"
1439+ // ),
1440+ noop ( uniq ) ,
14391441 matchedRefs . length > 1 &&
14401442 ( matchedRefs = matchedRefs . some ( ( r ) => r ?. name ( ) === initialBranch . name ( ) )
14411443 ? [ initialBranch ]
0 commit comments