{"thread":{"id":"6349","subject":"[PATCH] git-revert: Fix die before git-sh-setup defines it.","startedAt":"2007-01-12T06:45:38Z","lastAt":"2007-01-12T06:45:38Z","messageCount":1,"participants":["Bob Proulx"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"31546","messageId":"20070112064538.GA3012@dementia.proulx.com","threadId":"6349","inReplyTo":null,"subject":"[PATCH] git-revert: Fix die before git-sh-setup defines it.","fromName":"Bob Proulx","fromEmail":"bob@proulx.com","sentAt":"2007-01-12T06:45:38Z","receivedAt":"2007-01-12T06:45:38Z","isPatch":true,"sender":{"key":"bob@proulx.com","avatar":"https://gravatar.com/avatar/26fddd50bfc4bf6a65df572118e9f22771dae2ecf91b33fb99fc9a360fbfce86?d=mp&s=160"},"body":"The code previously checked it's own name and called 'die' upon\nan error.  However 'die' was not yet defined because git-sh-setup\nhad not been sourced yet.  Instead simply write the error message\nto stderr and exit with an error as was originally desired.\n\nSigned-off-by: Bob Proulx <bob@proulx.com>\n---\n\nI found this by inspection.  I contemplated several different ways of\nresolving it but in the end the simplest seemed to be the best.\n\n git-revert.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-revert.sh b/git-revert.sh\nindex 50cc47b..5ca894a 100755\n--- a/git-revert.sh\n+++ b/git-revert.sh\n@@ -16,7 +16,7 @@ case \"$0\" in\n \tme=cherry-pick\n \tUSAGE='[--edit] [-n] [-r] [-x] <commit-ish>'  ;;\n * )\n-\tdie \"What are you talking about?\" ;;\n+\techo \"What are you talking about?\" 1>&2 ; exit 1 ;;\n esac\n . git-sh-setup\n \n-- \n1.4.0\n"}]}