diff options
-rw-r--r-- | builtin/repack.c | 2 | ||||
-rwxr-xr-x | t/t7700-repack.sh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/builtin/repack.c b/builtin/repack.c index 50cc281527..a02ef0dcdf 100644 --- a/builtin/repack.c +++ b/builtin/repack.c @@ -191,7 +191,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix) git_repack_usage, 0); if (pack_kept_objects < 0) - pack_kept_objects = write_bitmap; + pack_kept_objects = write_bitmap > 0; packdir = mkpathdup("%s/pack", get_object_directory()); packtmp = mkpathdup("%s/.tmp-%d-pack", packdir, (int)getpid()); diff --git a/t/t7700-repack.sh b/t/t7700-repack.sh index 44f9497421..f207b91f0a 100755 --- a/t/t7700-repack.sh +++ b/t/t7700-repack.sh @@ -37,7 +37,7 @@ test_expect_success 'objects in packs marked .keep are not repacked' ' test_expect_success 'writing bitmaps can duplicate .keep objects' ' # build on $objsha1, $packsha1, and .keep state from previous - git repack -Adl && + git repack -Adbl && test_when_finished "found_duplicate_object=" && for p in .git/objects/pack/*.idx; do idx=$(basename $p) |