Merge branch 'nd/repack-keep-pack'
authorJunio C Hamano <gitster@pobox.com>
Wed, 23 May 2018 05:38:14 +0000 (14:38 +0900)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 May 2018 05:38:14 +0000 (14:38 +0900)
"git gc" in a large repository takes a lot of time as it considers
to repack all objects into one pack by default. The command has
been taught to pretend as if the largest existing packfile is
marked with ".keep" so that it is left untouched while objects in
other packs and loose ones are repacked.

* nd/repack-keep-pack:
pack-objects: show some progress when counting kept objects
gc --auto: exclude base pack if not enough mem to "repack -ad"
gc: handle a corner case in gc.bigPackThreshold
gc: add gc.bigPackThreshold config
gc: add --keep-largest-pack option
repack: add --keep-pack option
t7700: have closing quote of a test at the beginning of line

1  2 
Documentation/config.txt
Documentation/git-gc.txt
builtin/gc.c
builtin/pack-objects.c
config.mak.uname
git-compat-util.h
object-store.h
Simple merge
Simple merge
diff --cc builtin/gc.c
index d604940bb64c8b21b02931e48e875580c454383e,3c7c93e961160733ba6efe77722ad1ce06d887c0..c4777b2449e331336bac0baea317adb7c387eefb
@@@ -354,7 -493,7 +493,8 @@@ int cmd_gc(int argc, const char **argv
        const char *name;
        pid_t pid;
        int daemonized = 0;
+       int keep_base_pack = -1;
 +      timestamp_t dummy;
  
        struct option builtin_gc_options[] = {
                OPT__QUIET(&quiet, N_("suppress progress reporting")),
Simple merge
index a6e734c5d4ae7a3fc733e24bbfeae15ce6130ac4,ae9cbccec1d5f2ebbb6aedcee0a6acd65b4eb0c6..684fc5bf02677bbaddd214f78b14fa55df7025c2
@@@ -37,7 -37,7 +37,8 @@@ ifeq ($(uname_S),Linux
        HAVE_GETDELIM = YesPlease
        SANE_TEXT_GREP=-a
        FREAD_READS_DIRECTORIES = UnfortunatelyYes
+       BASIC_CFLAGS += -DHAVE_SYSINFO
 +      PROCFS_EXECUTABLE_PATH = /proc/self/exe
  endif
  ifeq ($(uname_S),GNU/kFreeBSD)
        HAVE_ALLOCA_H = YesPlease
Simple merge
diff --cc object-store.h
Simple merge