summaryrefslogtreecommitdiff
path: root/git-repack.sh
diff options
context:
space:
mode:
authorBrandon Casey <casey@nrlssc.navy.mil>2008-11-13 20:11:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-11-15 05:39:10 (GMT)
commit83d0289df6fb4deae100ee3fc37b90683c2e8c9f (patch)
tree0c863808154fd99432f37d205c286eda6512b622 /git-repack.sh
parent3289b9dec56d34fe05f90c262d11adc0a61e16e7 (diff)
downloadgit-83d0289df6fb4deae100ee3fc37b90683c2e8c9f.zip
git-83d0289df6fb4deae100ee3fc37b90683c2e8c9f.tar.gz
git-83d0289df6fb4deae100ee3fc37b90683c2e8c9f.tar.bz2
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 4d313d1..458a497 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