Skip to content

Commit f7991d1

Browse files
drafnelgitster
authored andcommitted
repack: do not fall back to incremental repacking with [-a|-A]
When repack is called with either the -a or -A option, the user has requested to repack all objects including those referenced by the alternates mechanism. Currently, if there are no local packs without .keep files, then repack will call pack-objects with the '--unpacked --incremental' options which causes it to exclude alternate packed objects. So, remove this fallback. Signed-off-by: Brandon Casey <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent dd71836 commit f7991d1

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

git-repack.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,10 @@ case ",$all_into_one," in
7171
existing="$existing $e"
7272
fi
7373
done
74-
fi
75-
if test -z "$args"
76-
then
77-
args='--unpacked --incremental'
78-
elif test -n "$unpack_unreachable"
79-
then
80-
args="$args $unpack_unreachable"
74+
if test -n "$args" -a -n "$unpack_unreachable"
75+
then
76+
args="$args $unpack_unreachable"
77+
fi
8178
fi
8279
;;
8380
esac

0 commit comments

Comments
 (0)