summaryrefslogtreecommitdiff
path: root/git-repack.sh
diff options
context:
space:
mode:
authorBrandon Casey <casey@nrlssc.navy.mil>2008-11-13 14:11:46 -0600
committerJunio C Hamano <gitster@pobox.com>2008-11-14 21:39:10 -0800
commit83d0289df6fb4deae100ee3fc37b90683c2e8c9f (patch)
tree0c863808154fd99432f37d205c286eda6512b622 /git-repack.sh
parent3289b9dec56d34fe05f90c262d11adc0a61e16e7 (diff)
downloadgit-83d0289df6fb4deae100ee3fc37b90683c2e8c9f.tar.gz
repack: only unpack-unreachable if we are deleting redundant packs
The -A option calls pack-objects with the --unpack-unreachable option so that the unreachable objects in local packs are left in the local object store loose. But if the -d option to repack was _not_ used, then these unpacked loose objects are redundant and unnecessary. Update tests in t7701. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-repack.sh')
-rwxr-xr-xgit-repack.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-repack.sh b/git-repack.sh
index 4d313d136e..458a497af8 100755
--- a/git-repack.sh
+++ b/git-repack.sh
@@ -71,7 +71,8 @@ case ",$all_into_one," in
existing="$existing $e"
fi
done
- if test -n "$args" -a -n "$unpack_unreachable"
+ if test -n "$args" -a -n "$unpack_unreachable" -a \
+ -n "$remove_redundant"
then
args="$args $unpack_unreachable"
fi