diff options
author | Linus Torvalds <torvalds@osdl.org> | 2005-11-21 12:38:31 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-11-21 14:08:49 -0800 |
commit | ef07618fdd660057b80fe75007405c62502a5820 (patch) | |
tree | 68867d0b3f7a3c1918ffb614e4b48f90ced6d166 /git-repack.sh | |
parent | b17e659dd4007cb1d3eb5ac32b524c0c5ab59601 (diff) | |
download | git-ef07618fdd660057b80fe75007405c62502a5820.tar.gz git-ef07618fdd660057b80fe75007405c62502a5820.tar.xz |
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 <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-repack.sh')
-rwxr-xr-x | git-repack.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git-repack.sh b/git-repack.sh index 4e16d3497..c0f271d10 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 |