Skip to content

Commit c5b09fe

Browse files
spearcegitster
authored andcommitted
Avoid update hook during git-rebase --interactive
If we are rebasing changes that contain potential whitespace errors that our .git/hooks/pre-commit hook looks for and fails on then git-commit will fail to commit that change. This causes git-rebase--interactive to squash commits together, even though it was not requested to do so by the todo file. Passing --no-verify to git-commit makes git-rebase -i behave more like git-rebase normally would in such conditions, providing more consistent behavior between the different rebase implementations. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 20b178d commit c5b09fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git-rebase--interactive.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ do_next () {
296296
GIT_AUTHOR_NAME="$GIT_AUTHOR_NAME" \
297297
GIT_AUTHOR_EMAIL="$GIT_AUTHOR_EMAIL" \
298298
GIT_AUTHOR_DATE="$GIT_AUTHOR_DATE" \
299-
$USE_OUTPUT git commit -F "$MSG" $EDIT_COMMIT
299+
$USE_OUTPUT git commit --no-verify -F "$MSG" $EDIT_COMMIT
300300
;;
301301
t)
302302
cp "$MSG" "$GIT_DIR"/MERGE_MSG
@@ -372,7 +372,7 @@ do
372372
test ! -f "$DOTEST"/amend || git reset --soft HEAD^
373373
} &&
374374
export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_AUTHOR_DATE &&
375-
git commit -F "$DOTEST"/message -e
375+
git commit --no-verify -F "$DOTEST"/message -e
376376

377377
require_clean_work_tree
378378
do_rest

0 commit comments

Comments
 (0)