Skip to content

Commit 38b583e

Browse files
committed
fix: 🐛 correct rebase loop condition to handle errors properly
1 parent 45ca873 commit 38b583e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/gitutils/_git-fix-up.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ fi
5454
# Start an interactive rebase with autosquash
5555
git rebase -i --autosquash $sha~ --autostash --no-verify --reschedule-failed-exec --exec 'git hook run --ignore-missing pre-commit -- HEAD HEAD~1 && git commit --amend --no-edit --no-verify' --no-verify
5656

57-
while [ $? -eq 0 ]; do
57+
while [ $? -ne 0 ]; do
5858

5959
# Check if there are any composer conflicts during the rebase
6060
if [ -f composer.lock ]; then
@@ -79,7 +79,7 @@ while [ $? -eq 0 ]; do
7979
fi
8080

8181
# Continue the rebase process
82-
git rebase --continue || true
82+
git rebase --continue
8383
done
8484

8585
# if rebase successful and push option is set, push force the changes

0 commit comments

Comments
 (0)