From: freku045@student.liu.se Date: Sat, 10 Dec 2005 19:37:58 GMT Subject: [PATCH 12/25] git-lost-found: Print usage message on incorrect invocation. Message-ID: <11342434782774-git-send-email-freku045@student.liu.se> In-Reply-To: <1134243476675-git-send-email-freku045@student.liu.se> Signed-off-by: Fredrik Kuivinen --- git-lost-found.sh | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) 2b2c389a8816f40cfa5b562203988b0c0b2269c5 diff --git a/git-lost-found.sh b/git-lost-found.sh index 2beec2a..757e51f 100755 --- a/git-lost-found.sh +++ b/git-lost-found.sh @@ -1,6 +1,16 @@ #!/bin/sh -GIT_DIR=`git-rev-parse --git-dir` || exit $? +. git-sh-setup + +usage () { + die "usage: $0" +} + +if [ "$#" != "0" ] +then + usage +fi + laf="$GIT_DIR/lost-found" rm -fr "$laf" && mkdir -p "$laf/commit" "$laf/other" || exit -- 0.99.9.GIT