Once upon a time, repack had only a single option which began with the first letter of the alphabet. Then, a second was created which would repack unreachable objects into the newly created pack so that git-gc --auto could be invented. But, the -a option was still necessary so that it could be called every now and then to discard the unreachable objects that were being repacked over and over and over into newly generated packs. Later, -A was changed so that instead of repacking the unreachable objects, it ejected them from the pack so that they resided in the object store in loose form, to be garbage collected by prune-packed according to normal expiry rules. And so, -a lost its raison d'etre. Signed-off-by: Brandon Casey <casey@xxxxxxxxxxxxxxx> --- This is on top of bc/maint-keep-pack -brandon Documentation/git-repack.txt | 25 ++++++++++++------------- git-repack.sh | 8 ++++---- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/Documentation/git-repack.txt b/Documentation/git-repack.txt index aaa8852..d04d5c2 100644 --- a/Documentation/git-repack.txt +++ b/Documentation/git-repack.txt @@ -32,21 +32,20 @@ OPTIONS pack everything referenced into a single pack. Especially useful when packing a repository that is used for private development and there is no need to worry - about people fetching via dumb protocols from it. Use - with '-d'. This will clean up the objects that `git prune` - leaves behind, but `git fsck --full` shows as - dangling. + about people fetching via dumb protocols from it. If used + with '-d' , then any unreachable objects in a previous pack will + become loose, unpacked objects, instead of being left in the + old pack. Unreachable objects are never intentionally added to + a pack, even when repacking. This option prevents unreachable + objects from being immediately deleted by way of being left in + the old pack and then removed. Instead, the loose unreachable + objects will be pruned according to normal expiry rules + with the next 'git-gc' invocation. See linkgit:git-gc[1]. -A:: - Same as `-a`, unless '-d' is used. Then any unreachable - objects in a previous pack become loose, unpacked objects, - instead of being left in the old pack. Unreachable objects - are never intentionally added to a pack, even when repacking. - This option prevents unreachable objects from being immediately - deleted by way of being left in the old pack and then - removed. Instead, the loose unreachable objects - will be pruned according to normal expiry rules - with the next 'git-gc' invocation. See linkgit:git-gc[1]. + Same as `-a`. Historical note: the -a and -A options used to differ + in that -a did not leave unreachable objects unpacked. Instead, + they were removed along with the redundant pack (when -d was used). -d:: After packing, if the newly created packs make some diff --git a/git-repack.sh b/git-repack.sh index 458a497..f1e21b9 100755 --- a/git-repack.sh +++ b/git-repack.sh @@ -7,8 +7,9 @@ OPTIONS_KEEPDASHDASH= OPTIONS_SPEC="\ git repack [options] -- -a pack everything in a single pack -A same as -a, and turn unreachable objects loose +a pack everything in a single pack, and turn unreachable objects + loose +A same as -a d remove redundant packs, and run git-prune-packed f pass --no-reuse-object to git-pack-objects n do not run git-update-server-info @@ -29,8 +30,7 @@ while test $# != 0 do case "$1" in -n) no_update_info=t ;; - -a) all_into_one=t ;; - -A) all_into_one=t + -a|-A) all_into_one=t unpack_unreachable=--unpack-unreachable ;; -d) remove_redundant=t ;; -q) quiet=-q ;; -- 1.6.0.3.552.g12334 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html