Staging
v0.5.1
https://github.com/git/git
Revision f7a2eb735982e921ae4379f1dcf5f7a023610393 authored by Junio C Hamano on 12 November 2005, 06:37:38 UTC, committed by Junio C Hamano on 12 November 2005, 06:37:38 UTC
This is GIT 1.0-rc1 in disguise.  It is plausible that
relatively new parts of the system still need tweaking and
fixing, but that is why it is not 1.0 but rc ;-).

Signed-off-by: Junio C Hamano <junkio@cox.net>
2 parent s 23ea3e2 + 7765e7e
Raw File
Tip revision: f7a2eb735982e921ae4379f1dcf5f7a023610393 authored by Junio C Hamano on 12 November 2005, 06:37:38 UTC
GIT 0.99.9h
Tip revision: f7a2eb7
git-lost+found.sh
#!/bin/sh

. git-sh-setup || die "Not a git archive."

laf="$GIT_DIR/lost-found"
rm -fr "$laf" && mkdir -p "$laf/commit" "$laf/other" || exit

git fsck-objects |
while read dangling type sha1
do
	case "$dangling" in
	dangling)
		if git-rev-parse --verify "$sha1^0" >/dev/null 2>/dev/null
		then
			dir="$laf/commit"
			git-show-branch "$sha1"
		else
			dir="$laf/other"
		fi
		echo "$sha1" >"$dir/$sha1"
		;;
	esac
done
back to top