1#!/bin/sh23. git-sh-setup45laf="$GIT_DIR/lost-found"6rm -fr "$laf" && mkdir -p "$laf/commit" "$laf/other" || exit78git fsck-objects |9while read dangling type sha110do11case "$dangling" in12dangling)13if git-rev-parse --verify "$sha1^0" >/dev/null 2>/dev/null14then15dir="$laf/commit"16git-show-branch "$sha1"17else18dir="$laf/other"19fi20echo "$sha1" >"$dir/$sha1"21;;22esac23done