[PATCH] Give --full-objects flag to rev-list when preparing a dumb server.
- From
Junio C Hamano <junkio@cox.net>
- Date
- Jul 8, 2005, 01:03 UTC
- Message-ID
- <7vpstuds7h.fsf_-_@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.58.0507071657140.25104@g5.osdl.org>
>>>>> "LT" == Linus Torvalds <torvalds@osdl.org> writes:
LT> This is nasty - if you mis-spell "self-sufficient" (easy enough to do) LT> you'll never know the end result isn't what you expected. It won't warn LT> you in any way, it will just make a non-self-sufficient pack..
To match the change of flag name to --full-objects,...
------------ This adds --full flag to git-repack-script, and uses it when preparing the dumb server material.
Signed-off-by: Junio C Hamano <junkio@cox.net> ---
git-repack-script | 10 +++++++++- git-update-dumb-server-script | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-)
0617ae867e7e27a7b484827f882fe7b396bea004
diff --git a/git-repack-script b/git-repack-script --- a/git-repack-script +++ b/git-repack-script @@ -1,8 +1,16 @@ #!/bin/sh : ${GIT_DIR=.git} : ${GIT_OBJECT_DIRECTORY="$GIT_DIR/objects"} + +case "$1" in +--full) + objects=--full-objects ;; +*) + objects=--objects ;; +esac + rm -f .tmp-pack-* -packname=$(git-rev-list --unpacked --objects $(git-rev-parse --all) | +packname=$(git-rev-list --unpacked $objects $(git-rev-parse --all) | git-pack-objects --non-empty --incremental .tmp-pack) || exit 1 if [ -z "$packname" ]; then diff --git a/git-update-dumb-server-script b/git-update-dumb-server-script --- a/git-update-dumb-server-script +++ b/git-update-dumb-server-script @@ -26,7 +26,7 @@ plain_size=$( if test $max_plain_size -lt $plain_size >/dev/null then - git-repack-script && git-prune-packed + git-repack-script --full && git-prune-packed fi && git-update-dumb-server && ------------