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:

committed by
Junio C Hamano

parent
caf038cb4e
commit
cc1453e1da
@ -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"
|
||||
|
Reference in New Issue
Block a user