rebase: factor out call to pre-rebase hook

Remove the call to the pre-rebase hook from
git-rebase--interactive.sh and rely on the call in
git-rebase.sh.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Martin von Zweigbergk
2011-02-06 13:43:44 -05:00
committed by Junio C Hamano
parent caf038cb4e
commit cc1453e1da
2 changed files with 7 additions and 19 deletions

View File

@ -109,18 +109,6 @@ commit_message () {
git cat-file commit "$1" | sed "1,/^$/d"
}
run_pre_rebase_hook () {
if test -z "$ok_to_skip_pre_rebase" &&
test -x "$GIT_DIR/hooks/pre-rebase"
then
"$GIT_DIR/hooks/pre-rebase" ${1+"$@"} || {
echo >&2 "The pre-rebase hook refused to rebase."
exit 1
}
fi
}
orig_reflog_action="$GIT_REFLOG_ACTION"
comment_for_reflog () {
@ -753,8 +741,6 @@ esac
git var GIT_COMMITTER_IDENT >/dev/null ||
die "You need to set your committer info first"
run_pre_rebase_hook "$upstream_arg" "$@"
comment_for_reflog start
if test ! -z "$switch_to"