git-lost-found: Usage string clean-up, emit usage string at incorrect invocation
[git.git] / git-am.sh
index 8f073c9..39f2552 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
@@ -1,14 +1,10 @@
 #!/bin/sh
 #
 #
-. git-sh-setup || die "Not a git archive"
 
-usage () {
-    echo >&2 "usage: $0 [--signoff] [--dotest=<dir>] [--utf8] [--binary] [--3way] <mbox>"
-    echo >&2 " or, when resuming"
-    echo >&2 " $0 [--skip | --resolved]"
-    exit 1;
-}
+USAGE='[--signoff] [--dotest=<dir>] [--utf8] [--binary] [--3way] <mbox>
+  or, when resuming [--skip | --resolved]'
+. git-sh-setup
 
 stop_here () {
     echo "$1" >"$dotest/next"
@@ -312,7 +308,7 @@ do
                echo "--------------------------"
                cat "$dotest/final-commit"
                echo "--------------------------"
-               echo -n "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all "
+               printf "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all "
                read reply
                case "$reply" in
                [yY]*) action=yes ;;