summaryrefslogtreecommitdiff
path: root/git-lost-found.sh
diff options
context:
space:
mode:
authorfreku045@student.liu.se <freku045@student.liu.se>2005-12-13 22:30:31 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-12-14 10:53:44 (GMT)
commitd20e2f161b068c00e95c6deea7ada9487945e8b7 (patch)
tree915feadeb4a532cf6062355a7a269a0a6c67269e /git-lost-found.sh
parent87358b7a193e24ed6cbe0dd8287a5c558a8ac421 (diff)
downloadgit-d20e2f161b068c00e95c6deea7ada9487945e8b7.zip
git-d20e2f161b068c00e95c6deea7ada9487945e8b7.tar.gz
git-d20e2f161b068c00e95c6deea7ada9487945e8b7.tar.bz2
git-lost-found: Usage string clean-up, emit usage string at incorrect invocation
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-lost-found.sh')
-rwxr-xr-xgit-lost-found.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/git-lost-found.sh b/git-lost-found.sh
index 2beec2a..ba6d587 100755
--- a/git-lost-found.sh
+++ b/git-lost-found.sh
@@ -1,6 +1,14 @@
#!/bin/sh
-GIT_DIR=`git-rev-parse --git-dir` || exit $?
+USAGE=''
+SUBDIRECTORY_OK='Yes'
+. git-sh-setup
+
+if [ "$#" != "0" ]
+then
+ usage
+fi
+
laf="$GIT_DIR/lost-found"
rm -fr "$laf" && mkdir -p "$laf/commit" "$laf/other" || exit