summaryrefslogtreecommitdiff
path: root/git-rebase.sh
diff options
context:
space:
mode:
authorStephen Boyd <bebarino@gmail.com>2009-06-14 16:08:56 -0700
committerJunio C Hamano <gitster@pobox.com>2009-06-14 21:14:10 -0700
commitbc2bbc4542a220da5d28c432b6bf78a845a421c0 (patch)
tree99249dab196dbb09a8baec21f4d39e8963078be9 /git-rebase.sh
parent50a991ec46d57ffc4b7fbd0e8a13182dab3cd5de (diff)
downloadgit-bc2bbc4542a220da5d28c432b6bf78a845a421c0.tar.gz
pull, rebase: simplify to use die()
Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-xgit-rebase.sh9
1 files changed, 3 insertions, 6 deletions
diff --git a/git-rebase.sh b/git-rebase.sh
index b83fd3f970..334629fc97 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -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