summaryrefslogtreecommitdiff
path: root/git-lost-found.sh
diff options
context:
space:
mode:
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