diff options
author | Jeff King <peff@peff.net> | 2015-03-20 21:43:13 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-03-20 22:41:38 +0300 |
commit | 8d422993617be42a48a54fd7325d5ba5350c1082 (patch) | |
tree | d45cdb4f36b544a6b76a04a45a6694b27e8fa292 /t | |
parent | ff4056bbc35aa499f449cbab46702a76cea0e532 (diff) |
repack: turn on "ref paranoia" when doing a destructive repack
If we are repacking with "-ad", we will drop any unreachable
objects. Likewise, using "-Ad --unpack-unreachable=<time>"
will drop any old, unreachable objects. In these cases, we
want to make sure the reachability we compute with "--all"
is complete. We can do this by passing GIT_REF_PARANOIA=1 in
the environment to pack-objects.
Note that "-Ad" is safe already, because it only loosens
unreachable objects. It is up to "git prune" to avoid
deleting them.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t5312-prune-corruption.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t5312-prune-corruption.sh b/t/t5312-prune-corruption.sh index 5ffb81715e..e8d04ef1bf 100755 --- a/t/t5312-prune-corruption.sh +++ b/t/t5312-prune-corruption.sh @@ -38,7 +38,7 @@ test_expect_success 'put bogus object into pack' ' verbose git cat-file -e $bogus ' -test_expect_failure 'destructive repack keeps packed object' ' +test_expect_success 'destructive repack keeps packed object' ' test_might_fail git repack -Ad --unpack-unreachable=now && verbose git cat-file -e $bogus && test_might_fail git repack -ad && |