Make git-pack-redundant consider alt-odbs
PATCH 1/1 Make git-pack-redundant consider alt-odbs
[PATCH] Make git-pack-redundant consider alt-odbs
This patch changes git-pack-redundant so that packfiles in alternate object directories also are considered when deciding which objects are redundant.
This functionality is controlled by the flag '--alt-odb'.
Also convert the other flags to the long form, and update docs and git-repack accordingly.
---
On a related note; if you have unreachable objects in your packfiles, those objects might make otherwise redundant packfiles non-redundant.
Would it be a useful feature to be able to give git-pack-redundant a list of bad objects on stdin, which then will be ignored?
(eg. git-fsck-objects --full --unreachable | cut -s -d ' ' -f 3 | git-pack-redundant)
Documentation/git-pack-redundant.txt | 19 +++- git-repack.sh | 4 - pack-redundant.c | 147 ++++++++++++++++++++++------------ 3 files changed, 107 insertions(+), 63 deletions(-)
applies-to: 8f520c14677a07c01eb64f64bcd68cb174392ec9 ad7d016fcecacdfaf9cf0cc4b65fadf32e86899b
Documentation/git-pack-redundant.txt +11 -8
@@ -8,7 +8,7 @@ git-pack-redundant - Program used to fin SYNOPSIS -------- -'git-pack-redundant [ -v ] < -a | .pack filename ... >' +'git-pack-redundant [ --verbose ] [ --alt-odb ] < --all | .pack filename ... >' DESCRIPTION -----------
@@ -19,13 +19,16 @@ are redundant. The output is suitable fo OPTIONS ------- --v:: - Verbose. Outputs some statistics to stderr. - Has a small performance penalty. - --a:: - All. Processes all the local packs. Any filenames on - the commandline are ignored. + +--all:: + Processes all packs. Any filenames on the commandline are ignored. + +--alt-odb:: + Don't require objects present in packs from alternate object + directories to be present in local packs. + +--verbose:: + Outputs some statistics to stderr. Has a small performance penalty. Author ------
git-repack.sh +2 -2
@@ -45,7 +45,7 @@ if [ -z "$name" ]; then if test "$remove_redandant" = t ; then echo "Removing redundant packs." sync - redundant=$(git-pack-redundant -a) + redundant=$(git-pack-redundant --all) if test "$redundant" != "" ; then echo $redundant | xargs rm fi
@@ -63,7 +63,7 @@ exit if test "$remove_redandant" = t then sync - redundant=$(git-pack-redundant -a) + redundant=$(git-pack-redundant --all) if test "$redundant" != "" ; then echo $redundant | xargs rm fi
pack-redundant.c +94 -53
290 lines not on this page · raw message
---
0.99.9.GIT
Quoted 4 lines · Lukas Sandstr.ANvm
[PATCH] Make git-pack-redundant consider alt-odbs
This patch changes git-pack-redundant so that packfiles
...
This request is not just for Lukas, but people, please do not duplicate what is already on the Subject: line at the top of your message body.