@@ -1285,6 +1285,7 @@ async function extendCommitsWithBranchEnds(
12851285 const removeRemoteRegex = / ^ r e f s \/ r e m o t e s \/ [ ^ / ] * \/ / ;
12861286
12871287 const currentBranchCommit : Git . Oid = await referenceToOid ( currentBranch ) ;
1288+ noop ( currentBranchCommit ) ;
12881289
12891290 const extend = ( c : Git . Commit , i : number ) : CommitAndBranchBoundary => (
12901291 ( matchedRefs = refs . filter ( ( ref ) => ! ! ref . target ( ) ?. equal ( c . id ( ) ) ) ) ,
@@ -1316,35 +1317,36 @@ async function extendCommitsWithBranchEnds(
13161317 . map ( ( ref ) => ref . name ( ) . replace ( removeLocalRegex , "" ) )
13171318 . includes ( r . name ( ) . replace ( removeRemoteRegex , "" ) )
13181319 ) ) ,
1319- assert (
1320- matchedRefs . length <= 1 ||
1321- /**
1322- * if it's more than 1,
1323- * it's only allowed if all of the branches are the same ones,
1324- * just on different remotes.
1325- */
1326- ( matchedRefs . length > 1 &&
1327- uniq (
1328- matchedRefs . map ( ( r ) =>
1329- r
1330- ?. name ( )
1331- . replace ( removeLocalRegex , "" )
1332- . replace ( removeRemoteRegex , "" )
1333- )
1334- ) . length === 1 ) ,
1335- // ||
1336- // /**
1337- // * or, if it's the root branch
1338- // */
1339- // !c.id().cmp(currentBranchCommit),
1340- "" +
1341- "2 (or more) branches for the same commit, both in the same path - cannot continue" +
1342- "(until explicit branch specifying is implemented)" +
1343- "\n\n" +
1344- "matchedRefs = " +
1345- matchedRefs . map ( ( mr ) => mr ?. name ( ) ) +
1346- "\n"
1347- ) ,
1320+ // assert(
1321+ // matchedRefs.length <= 1 ||
1322+ // /**
1323+ // * if it's more than 1,
1324+ // * it's only allowed if all of the branches are the same ones,
1325+ // * just on different remotes.
1326+ // */
1327+ // (matchedRefs.length > 1 &&
1328+ // uniq(
1329+ // matchedRefs.map((r) =>
1330+ // r
1331+ // ?.name()
1332+ // .replace(removeLocalRegex, "")
1333+ // .replace(removeRemoteRegex, "")
1334+ // )
1335+ // ).length === 1),
1336+ // // ||
1337+ // // /**
1338+ // // * or, if it's the root branch
1339+ // // */
1340+ // // !c.id().cmp(currentBranchCommit),
1341+ // "" +
1342+ // "2 (or more) branches for the same commit, both in the same path - cannot continue" +
1343+ // "(until explicit branch specifying is implemented)" +
1344+ // "\n\n" +
1345+ // "matchedRefs = " +
1346+ // matchedRefs.map((mr) => mr?.name()) +
1347+ // "\n"
1348+ // ),
1349+ noop ( uniq ) ,
13481350 matchedRefs . length > 1 &&
13491351 ( matchedRefs = matchedRefs . some ( ( r ) => r ?. name ( ) === initialBranch . name ( ) )
13501352 ? [ initialBranch ]
0 commit comments