提交 bc2bbc45 编写于 作者: S Stephen Boyd 提交者: Junio C Hamano

pull, rebase: simplify to use die()

Signed-off-by: NStephen Boyd <bebarino@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 50a991ec
......@@ -176,13 +176,11 @@ case "$merge_head" in
?*' '?*)
if test -z "$orig_head"
then
echo >&2 "Cannot merge multiple branches into empty head"
exit 1
die "Cannot merge multiple branches into empty head"
fi
if test true = "$rebase"
then
echo >&2 "Cannot rebase onto multiple branches"
exit 1
die "Cannot rebase onto multiple branches"
fi
;;
esac
......
......@@ -168,10 +168,8 @@ 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
}
"$GIT_DIR/hooks/pre-rebase" ${1+"$@"} ||
die "The pre-rebase hook refused to rebase."
fi
}
......@@ -359,8 +357,7 @@ fi
# The tree must be really really clean.
if ! git update-index --ignore-submodules --refresh; then
echo >&2 "cannot rebase: you have unstaged changes"
exit 1
die "cannot rebase: you have unstaged changes"
fi
diff=$(git diff-index --cached --name-status -r --ignore-submodules HEAD --)
case "$diff" in
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册