Skip to content

Commit 9663fd9

Browse files
committed
linearize: fixed comment
1 parent 0000063 commit 9663fd9

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

git-linearize

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,7 @@ function cmd_linearize() {
293293
if $EL_REBASE_SPLITS; then
294294
# https://stackoverflow.com/a/46243464/14681457
295295
if [[ -n "${split_commit_map[$sha1]+unset}" ]]; then
296-
# List all branches that share this commit
297-
# Then loop through them and rebase them onto the new commit.
296+
# rebase the branch onto the new commit
298297
branch=${split_commit_map[$sha1]}
299298
git switch $branch | debug
300299
git rebase --onto $new_sha $sha1 | debug

testytest.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ make_dummy_commit
1717
# a-b-e-f main
1818
# \
1919
# c-d new-branch
20-
run_git_linearize "-v --short"
20+
run_git_linearize "--short"
2121
# 0-1-2 main
2222
# a-c-d new-branch
2323
# git switch new-branch
@@ -29,4 +29,10 @@ else
2929
echo "nay! $(git merge-base main new-branch)"
3030
fi
3131

32+
if [[ $(git merge-base main branch-2) == 000002* ]]; then
33+
echo "yay!"
34+
else
35+
echo "nay! $(git merge-base main new-branch)"
36+
fi
37+
3238
git log --graph --all

0 commit comments

Comments
 (0)