@matheusbsbs / matheus-bagliano / commits / 397dfe67c7
Fork 0

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>

Bob Proulx committed Jan 11, 2007 at 23:45 UTC 397dfe67c71fdd673bb108b9c6103e4a5e750edb
1 file changed +2 -1
git-revert.sh
+2 -1
@@ -16,7 +16,8 @@ case "$0" in
16 me=cherry-pick
17 USAGE='[--edit] [-n] [-r] [-x] <commit-ish>' ;;
18 * )
19 - die "What are you talking about?" ;;
19 + echo >&2 "What are you talking about?"
20 + exit 1 ;;
21 esac
22 . git-sh-setup
23 require_work_tree