Code

git config: reorganize to use parseopt
[git.git] / git-repack.sh
index d39eb6cea6174ac65f1cc13c98e4abeab3a90903..458a497af810c7bb188a5aafb80c32aa0bc05264 100755 (executable)
@@ -71,19 +71,17 @@ case ",$all_into_one," in
                                existing="$existing $e"
                        fi
                done
-       fi
-       if test -z "$args"
-       then
-               args='--unpacked --incremental'
-       elif test -n "$unpack_unreachable"
-       then
-               args="$args $unpack_unreachable"
+               if test -n "$args" -a -n "$unpack_unreachable" -a \
+                       -n "$remove_redundant"
+               then
+                       args="$args $unpack_unreachable"
+               fi
        fi
        ;;
 esac
 
 args="$args $local $quiet $no_reuse$extra"
-names=$(git pack-objects --non-empty --all --reflog $args </dev/null "$PACKTMP") ||
+names=$(git pack-objects --honor-pack-keep --non-empty --all --reflog $args </dev/null "$PACKTMP") ||
        exit 1
 if [ -z "$names" ]; then
        if test -z "$quiet"; then