[PATCH] Give --full-objects flag to rev-list when preparing a dumb server.
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:01
Subsystem:
the rest · Maintainer:
Linus Torvalds
quoted
quoted
quoted
quoted
"LT" == Linus Torvalds [off-list ref] 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 <redacted> --- 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 && ------------