Skip to content

Commit 198034c

Browse files
committed
WIP print matchedRefs if they go wrong
Signed-off-by: Kipras Melnikovas <kipras@kipras.org>
1 parent 48979aa commit 198034c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

git-stacked-rebase.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,14 @@ async function extendCommitsWithBranchEnds(
13441344
(matchedRefs = matchedRefs.some((r) => r?.name() === initialBranch.name())
13451345
? [initialBranch]
13461346
: matchedRefs.filter((r) => !r?.isRemote() /* r?.name().includes("refs/heads/") */)),
1347-
assert(matchedRefs.length <= 1, "refs/heads/ and refs/remotes/*/ replacement went wrong"),
1347+
assert(
1348+
matchedRefs.length <= 1,
1349+
"refs/heads/ and refs/remotes/*/ replacement went wrong." +
1350+
bullets(
1351+
"\nmatchedRefs:",
1352+
matchedRefs.map((r) => r.toString())
1353+
)
1354+
),
13481355
{
13491356
commit: c,
13501357
commitCommand: commandOrAliasNames[i] || "pick",

0 commit comments

Comments
 (0)