aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 2beec2aa6..ba6d587f3 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