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>
Shawn O. Pearce committed
Dec 19, 2007 at 01:41 UTC
c5b09feb786f6a2456ec3d8203d0f4d67f09f043
1 file changed
+2
-2
git-rebase--interactive.sh
+2
-2
@@ -296,7 +296,7 @@ do_next () {
296
GIT_AUTHOR_NAME="$GIT_AUTHOR_NAME" \
297
GIT_AUTHOR_EMAIL="$GIT_AUTHOR_EMAIL" \
298
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
300
;;
301
t)
302
cp "$MSG" "$GIT_DIR"/MERGE_MSG
@@ -372,7 +372,7 @@ do
372
test ! -f "$DOTEST"/amend || git reset --soft HEAD^
373
} &&
374
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
376
377
require_clean_work_tree
378
do_rest