From 6cf6193b458a5791dba993a81d3bb77f4dc030ac Mon Sep 17 00:00:00 2001 From: "freku045@student.liu.se" Date: Tue, 13 Dec 2005 23:30:31 +0100 Subject: git-applypatch: Usage string clean-up, emit usage string at incorrect invocation Signed-off-by: Fredrik Kuivinen Signed-off-by: Junio C Hamano --- git-applypatch.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'git-applypatch.sh') diff --git a/git-applypatch.sh b/git-applypatch.sh index a112e1a504..214f5c31a6 100755 --- a/git-applypatch.sh +++ b/git-applypatch.sh @@ -10,8 +10,12 @@ ## $3 - "info" file with Author, email and subject ## $4 - optional file containing signoff to add ## + +USAGE=' []' . git-sh-setup +[[ "$#" = "3" || "$#" = "4" ]] || usage + final=.dotest/final-commit ## ## If this file exists, we ask before applying -- cgit v1.2.3 From 5073eb04d6f0e8ac2578140b9231817e2afefe50 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 13 Dec 2005 18:19:12 -0800 Subject: applypatch: no need to do non-portable [[ ... ]] ... when old, proven, case would do. Signed-off-by: Junio C Hamano --- git-applypatch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-applypatch.sh') diff --git a/git-applypatch.sh b/git-applypatch.sh index 214f5c31a6..e8ba34a0ad 100755 --- a/git-applypatch.sh +++ b/git-applypatch.sh @@ -14,7 +14,7 @@ USAGE=' []' . git-sh-setup -[[ "$#" = "3" || "$#" = "4" ]] || usage +case "$#" in 3|4) usage ;; esac final=.dotest/final-commit ## -- cgit v1.2.3