repack: don't repack local objects in packs with .keep file
If the user created a .keep file for a local pack, then it can be inferred that the user does not want those objects repacked. This fixes the repack bug tested by t7700. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Casey committed
Nov 12, 2008 at 11:59 UTC
dd718365cccfddd7d5992a40296de50e7cabdfc8
2 files changed
+2
-2
git-repack.sh
+1
-1
@@ -83,7 +83,7 @@ case ",$all_into_one," in
83
esac
84
85
args="$args $local $quiet $no_reuse$extra"
86
-names=$(git pack-objects --non-empty --all --reflog $args </dev/null "$PACKTMP") ||
86
+names=$(git pack-objects --honor-pack-keep --non-empty --all --reflog $args </dev/null "$PACKTMP") ||
87
exit 1
88
if [ -z "$names" ]; then
89
if test -z "$quiet"; then
t/t7700-repack.sh
+1
-1
@@ -4,7 +4,7 @@ test_description='git repack works correctly'
4
5
. ./test-lib.sh
6
7
-test_expect_failure 'objects in packs marked .keep are not repacked' '
7
+test_expect_success 'objects in packs marked .keep are not repacked' '
8
echo content1 > file1 &&
9
echo content2 > file2 &&
10
git add . &&