[PATCH 22/25] git-status: Print usage message on incorrect invocation.
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
---
git-status.sh | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
5bce9bb1977eea80398f894880340f10bdc9a2eb
diff --git a/git-status.sh b/git-status.sh
index 2dda0c5..4ba6cc2 100755
--- a/git-status.sh
+++ b/git-status.sh
@@ -2,7 +2,17 @@
#
# Copyright (c) 2005 Linus Torvalds
#
-GIT_DIR=$(git-rev-parse --git-dir) || exit
+
+. git-sh-setup
+
+usage () {
+ die "usage: $0"
+}
+
+if [ "$#" != "0" ]
+then
+ usage
+fi
report () {
header="#
--
0.99.9.GIT