Skip to content

Commit

Permalink
git-revert: Fix die before git-sh-setup defines it.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bob Proulx authored and Junio C Hamano committed Jan 12, 2007
1 parent fc41be3 commit 397dfe6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion git-revert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 397dfe6

Please sign in to comment.