X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-lost-found.sh;h=b928f2ca52c1991ee50838fc47580ed83c58fb64;hb=73bcf53342f16a66ae4e02ed50a08bd34d846bfb;hp=3892f52005d1e36676681806a87ef35dc0689f22;hpb=6d5410d65137dc76a504b550872614170e2d98b3;p=git.git diff --git a/git-lost-found.sh b/git-lost-found.sh index 3892f5200..b928f2ca5 100755 --- a/git-lost-found.sh +++ b/git-lost-found.sh @@ -1,11 +1,18 @@ #!/bin/sh -. git-sh-setup || die "Not a git archive." +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 -git fsck-objects | +git fsck-objects --full | while read dangling type sha1 do case "$dangling" in