summaryrefslogtreecommitdiff
path: root/git-revert.sh
diff options
context:
space:
mode:
authorBob Proulx <bob@proulx.com>2007-01-12 06:45:38 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-01-12 08:13:34 (GMT)
commit397dfe67c71fdd673bb108b9c6103e4a5e750edb (patch)
tree80b99c987be0e082eb31d037e311b55611e6d6e8 /git-revert.sh
parentfc41be3b2e2eb2135e560077fc705dab7aade5f0 (diff)
downloadgit-397dfe67c71fdd673bb108b9c6103e4a5e750edb.zip
git-397dfe67c71fdd673bb108b9c6103e4a5e750edb.tar.gz
git-397dfe67c71fdd673bb108b9c6103e4a5e750edb.tar.bz2
git-revert: Fix die before git-sh-setup defines it.
The code previously checked it's own name and called 'die' upon an error. However 'die' was not yet defined because git-sh-setup had not been sourced yet. Instead simply write the error message to stderr and exit with an error as was originally desired. Signed-off-by: Bob Proulx <bob@proulx.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-revert.sh')
-rwxr-xr-xgit-revert.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-revert.sh b/git-revert.sh
index f9843c7..fcca3eb 100755
--- a/git-revert.sh
+++ b/git-revert.sh
@@ -16,7 +16,8 @@ case "$0" in
me=cherry-pick
USAGE='[--edit] [-n] [-r] [-x] <commit-ish>' ;;
* )
- die "What are you talking about?" ;;
+ echo >&2 "What are you talking about?"
+ exit 1 ;;
esac
. git-sh-setup
require_work_tree