{"thread":{"id":"19814","subject":"[PATCH] pull, rebase: simplify to use die()","startedAt":"2009-06-14T23:08:56Z","lastAt":"2009-06-14T23:08:56Z","messageCount":1,"participants":["Stephen Boyd"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"116296","messageId":"1245020936-7978-1-git-send-email-bebarino@gmail.com","threadId":"19814","inReplyTo":null,"subject":"[PATCH] pull, rebase: simplify to use die()","fromName":"Stephen Boyd","fromEmail":"bebarino@gmail.com","sentAt":"2009-06-14T23:08:56Z","receivedAt":"2009-06-14T23:08:56Z","isPatch":true,"sender":{"key":"bebarino@gmail.com","avatar":"https://avatars.githubusercontent.com/u/38832?v=4"},"body":"Signed-off-by: Stephen Boyd <bebarino@gmail.com>\n---\n\nI noticed these, and they're somewhat unrelated from the quiet\nstuff.\n\n git-pull.sh   |    6 ++----\n git-rebase.sh |    9 +++------\n 2 files changed, 5 insertions(+), 10 deletions(-)\n\ndiff --git a/git-pull.sh b/git-pull.sh\nindex 3526153..cab367a 100755\n--- a/git-pull.sh\n+++ b/git-pull.sh\n@@ -176,13 +176,11 @@ case \"$merge_head\" in\n ?*' '?*)\n \tif test -z \"$orig_head\"\n \tthen\n-\t\techo >&2 \"Cannot merge multiple branches into empty head\"\n-\t\texit 1\n+\t\tdie \"Cannot merge multiple branches into empty head\"\n \tfi\n \tif test true = \"$rebase\"\n \tthen\n-\t\techo >&2 \"Cannot rebase onto multiple branches\"\n-\t\texit 1\n+\t\tdie \"Cannot rebase onto multiple branches\"\n \tfi\n \t;;\n esac\ndiff --git a/git-rebase.sh b/git-rebase.sh\nindex b83fd3f..334629f 100755\n--- a/git-rebase.sh\n+++ b/git-rebase.sh\n@@ -168,10 +168,8 @@ run_pre_rebase_hook () {\n \tif test -z \"$OK_TO_SKIP_PRE_REBASE\" &&\n \t   test -x \"$GIT_DIR/hooks/pre-rebase\"\n \tthen\n-\t\t\"$GIT_DIR/hooks/pre-rebase\" ${1+\"$@\"} || {\n-\t\t\techo >&2 \"The pre-rebase hook refused to rebase.\"\n-\t\t\texit 1\n-\t\t}\n+\t\t\"$GIT_DIR/hooks/pre-rebase\" ${1+\"$@\"} ||\n+\t\tdie \"The pre-rebase hook refused to rebase.\"\n \tfi\n }\n \n@@ -359,8 +357,7 @@ fi\n \n # The tree must be really really clean.\n if ! git update-index --ignore-submodules --refresh; then\n-\techo >&2 \"cannot rebase: you have unstaged changes\"\n-\texit 1\n+\tdie \"cannot rebase: you have unstaged changes\"\n fi\n diff=$(git diff-index --cached --name-status -r --ignore-submodules HEAD --)\n case \"$diff\" in\n-- \n1.6.3.2.306.g4f4fa\n"}]}