From: freku045@student.liu.se Date: Sat, 10 Dec 2005 19:37:57 GMT Subject: [PATCH 7/25] git-count-objects: Die with usage message if we are invoked incorrectly. Message-ID: <11342434772549-git-send-email-freku045@student.liu.se> In-Reply-To: <1134243476675-git-send-email-freku045@student.liu.se> Signed-off-by: Fredrik Kuivinen --- git-count-objects.sh | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) 5db708396a841860c4d5e41c2acd60476d2207c4 diff --git a/git-count-objects.sh b/git-count-objects.sh index 40c58ef..0d544ad 100755 --- a/git-count-objects.sh +++ b/git-count-objects.sh @@ -3,7 +3,16 @@ # Copyright (c) 2005 Junio C Hamano # -GIT_DIR=`git-rev-parse --git-dir` || exit $? +. git-sh-setup + +usage () { + die "usage: $0" +} + +if [ "$#" != "0" ] +then + usage +fi dc /dev/null || { # This is not a real DC at all -- it just knows how -- 0.99.9.GIT