Skip to content

Commit 6547aad

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 647c3f2 commit 6547aad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git-stacked-rebase.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ async function createInitialEditTodoOfGitStackedRebase(
703703
const rebaseTodo = commitsWithBranchBoundaries
704704
.map(({ commit, branchEnd }, i) => {
705705
if (i === 0) {
706-
assert(!!branchEnd, "very first commit has a branch.");
706+
assert(!!branchEnd, `very first commit has a branch (${commit.sha()}).`);
707707

708708
// return [];
709709
return [
@@ -716,7 +716,7 @@ async function createInitialEditTodoOfGitStackedRebase(
716716
}
717717

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

721721
return [
722722
`pick ${commit.sha()} ${commit.summary()}`,

0 commit comments

Comments
 (0)