From ef07618fdd660057b80fe75007405c62502a5820 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Mon, 21 Nov 2005 12:38:31 -0800 Subject: git-repack: Properly abort in corrupt repository In a corrupt repository, git-repack produces a pack that does not contain needed objects without complaining, and the result of this combined with -d flag can be very painful -- e.g. a lossage of one tree object can lead to lossage of blobs reachable only through that tree. Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- git-repack.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-repack.sh') diff --git a/git-repack.sh b/git-repack.sh index 4e16d34971..c0f271d101 100755 --- a/git-repack.sh +++ b/git-repack.sh @@ -41,7 +41,7 @@ esac if [ "$local" ]; then pack_objects="$pack_objects --local" fi -name=$(git-rev-list --objects $rev_list $(git-rev-parse $rev_parse) | +name=$(git-rev-list --objects $rev_list $(git-rev-parse $rev_parse) 2>&1 | git-pack-objects --non-empty $pack_objects .tmp-pack) || exit 1 if [ -z "$name" ]; then -- cgit v1.2.1