X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-lost-found.sh;h=58570dff137adfdeb72ebf3f088af7379eded522;hb=f48fd68887a03756658a46486a5dd1301c5a655f;hp=3892f52005d1e36676681806a87ef35dc0689f22;hpb=3eeb419968c1f8f0a762a7127db770e9d9c8037d;p=git.git diff --git a/git-lost-found.sh b/git-lost-found.sh index 3892f5200..58570dff1 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 --full --no-reflogs | while read dangling type sha1 do case "$dangling" in