{"thread":{"id":"11352","subject":"[PATCH 1/2] Avoid update hook during git-rebase --interactive","startedAt":"2007-12-19T06:41:26Z","lastAt":"2007-12-19T06:41:26Z","messageCount":1,"participants":["Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"63716","messageId":"20071219064125.GA8915@spearce.org","threadId":"11352","inReplyTo":null,"subject":"[PATCH 1/2] Avoid update hook during git-rebase --interactive","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-12-19T06:41:26Z","receivedAt":"2007-12-19T06:41:26Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"If we are rebasing changes that contain potential whitespace\nerrors that our .git/hooks/pre-commit hook looks for and fails\non then git-commit will fail to commit that change.  This causes\ngit-rebase--interactive to squash commits together, even though it\nwas not requested to do so by the todo file.\n\nPassing --no-verify to git-commit makes git-rebase -i behave more\nlike git-rebase normally would in such conditions, providing more\nconsistent behavior between the different rebase implementations.\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n\n This bug has bitten me more than once.  One could argue that the\n pre-commit hook should be running, to prevent you from rebasing a\n series that has crappy whitespace, but git-rebase without -m and\n without -i will let you rebase such a series without stopping you,\n as git-am doesn't execute the pre-commit hook.\n\n git-rebase--interactive.sh |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\nindex cd7e43f..b846ea8 100755\n--- a/git-rebase--interactive.sh\n+++ b/git-rebase--interactive.sh\n@@ -296,7 +296,7 @@ do_next () {\n \t\t\tGIT_AUTHOR_NAME=\"$GIT_AUTHOR_NAME\" \\\n \t\t\tGIT_AUTHOR_EMAIL=\"$GIT_AUTHOR_EMAIL\" \\\n \t\t\tGIT_AUTHOR_DATE=\"$GIT_AUTHOR_DATE\" \\\n-\t\t\t$USE_OUTPUT git commit -F \"$MSG\" $EDIT_COMMIT\n+\t\t\t$USE_OUTPUT git commit --no-verify -F \"$MSG\" $EDIT_COMMIT\n \t\t\t;;\n \t\tt)\n \t\t\tcp \"$MSG\" \"$GIT_DIR\"/MERGE_MSG\n@@ -372,7 +372,7 @@ do\n \t\t\ttest ! -f \"$DOTEST\"/amend || git reset --soft HEAD^\n \t\t} &&\n \t\texport GIT_AUTHOR_NAME GIT_AUTHOR_NAME GIT_AUTHOR_DATE &&\n-\t\tgit commit -F \"$DOTEST\"/message -e\n+\t\tgit commit --no-verify -F \"$DOTEST\"/message -e\n \n \t\trequire_clean_work_tree\n \t\tdo_rest\n-- \n1.5.4.rc0.1155.g12ed9\n"}]}