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