]> asedeno.scripts.mit.edu Git - git.git/blobdiff - git-repack.sh
Merge branch 'jk/clone-post-checkout'
[git.git] / git-repack.sh
index be6db5e805d62e0440f7de3c1f6ee3fcd16a2ed3..0144c2d7b95d5393b7993c95e6aff46f18f01e8b 100755 (executable)
@@ -60,6 +60,7 @@ case ",$all_into_one," in
        args='--unpacked --incremental'
        ;;
 ,t,)
+       args= existing=
        if [ -d "$PACKDIR" ]; then
                for e in `cd "$PACKDIR" && find . -type f -name '*.pack' \
                        | sed -e 's/^\.\///' -e 's/\.pack$//'`
@@ -67,10 +68,13 @@ case ",$all_into_one," in
                        if [ -e "$PACKDIR/$e.keep" ]; then
                                : keep
                        else
-                               args="$args --unpacked=$e.pack"
                                existing="$existing $e"
                        fi
                done
+               if test -n "$existing"
+               then
+                       args="--kept-pack-only"
+               fi
                if test -n "$args" -a -n "$unpack_unreachable" -a \
                        -n "$remove_redundant"
                then