Skip to content

Commit 2ee425f

Browse files
committed
print commit's SHA in assert if first/last commits do not have a branch
Signed-off-by: Kipras Melnikovas <[email protected]>
1 parent 0a41eac commit 2ee425f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git-stacked-rebase.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ async function createInitialEditTodoOfGitStackedRebase(
712712
const rebaseTodo = commitsWithBranchBoundaries
713713
.map(({ commit, branchEnd }, i) => {
714714
if (i === 0) {
715-
assert(!!branchEnd, "very first commit has a branch.");
715+
assert(!!branchEnd, `very first commit has a branch (${commit.sha()}).`);
716716

717717
// return [];
718718
return [
@@ -725,7 +725,7 @@ async function createInitialEditTodoOfGitStackedRebase(
725725
}
726726

727727
if (i === commitsWithBranchBoundaries.length - 1) {
728-
assert(!!branchEnd, "very last commit has a branch.");
728+
assert(!!branchEnd, `very last commit has a branch. sha = ${commit.sha()}`);
729729

730730
return [
731731
`pick ${commit.sha()} ${commit.summary()}`,

0 commit comments

Comments
 (0)