From: Junio C Hamano Date: Sat, 15 Sep 2007 05:33:28 +0000 (-0700) Subject: Merge branch 'np/delta' X-Git-Tag: v1.5.4-rc0~440 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/d225ae59c9102f2769c55749f80f7a94a92713e4?ds=inline;hp=-c Merge branch 'np/delta' * np/delta: builtin-pack-objects.c: avoid bogus gcc warnings threaded delta search: proper locking for cache accounting threaded delta search: add pack.threads config variable fix threaded delta search locking threaded delta search: specify number of threads at run time threaded delta search: better chunck split point threaded delta search: refine work allocation basic threaded delta search rearrange delta search progress reporting localize window memory usage accounting straighten the list of objects to deltify --- d225ae59c9102f2769c55749f80f7a94a92713e4 diff --combined Documentation/git-pack-objects.txt index f8a0be3511,f9b97956e3..628f296ce1 --- a/Documentation/git-pack-objects.txt +++ b/Documentation/git-pack-objects.txt @@@ -155,8 -155,12 +155,8 @@@ base-name: generated pack. If not specified, pack compression level is determined first by pack.compression, then by core.compression, and defaults to -1, the zlib default, if neither is set. - Data copied from loose objects will be recompressed - if core.legacyheaders was true when they were created or if - the loose compression level (see core.loosecompression and - core.compression) is now a different value than the pack - compression level. Add --no-reuse-object if you want to force - a uniform compression level on all data no matter the source. + Add \--no-reuse-object if you want to force a uniform compression + level on all data no matter the source. --delta-base-offset:: A packed archive can express base object of a delta as @@@ -169,6 -173,14 +169,14 @@@ length, this option typically shrinks the resulting packfile by 3-5 per-cent. + --threads=:: + Specifies the number of threads to spawn when searching for best + delta matches. This requires that pack-objects be compiled with + pthreads otherwise this option is ignored with a warning. + This is meant to reduce packing time on multiprocessor machines. + The required amount of memory for the delta search window is + however multiplied by the number of threads. + --index-version=[,]:: This is intended to be used by the test suite only. It allows to force the version for the generated pack index, and to force diff --combined Makefile index 78cdaa155b,a92fb31695..40567ece14 --- a/Makefile +++ b/Makefile @@@ -28,8 -28,6 +28,8 @@@ all: # # Define NO_STRCASESTR if you don't have strcasestr. # +# Define NO_MEMMEM if you don't have memmem. +# # Define NO_STRLCPY if you don't have strlcpy. # # Define NO_STRTOUMAX if you don't have strtoumax in the C library. @@@ -124,6 -122,9 +124,9 @@@ # If not set it defaults to the bare 'wish'. If it is set to the empty # string then NO_TCLTK will be forced (this is used by configure script). # + # Define THREADED_DELTA_SEARCH if you have pthreads and wish to exploit + # parallel delta searching when packing objects. + # GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE @$(SHELL_PATH) ./GIT-VERSION-GEN @@@ -283,7 -284,7 +286,7 @@@ LIB_FILE=libgit. XDIFF_LIB=xdiff/lib.a LIB_H = \ - archive.h blob.h cache.h commit.h csum-file.h delta.h grep.h \ + archive.h blob.h cache.h cache-tree.h commit.h csum-file.h delta.h grep.h \ diff.h object.h pack.h pkt-line.h quote.h refs.h list-objects.h sideband.h \ run-command.h strbuf.h tag.h tree.h git-compat-util.h revision.h \ tree-walk.h log-tree.h dir.h path-list.h unpack-trees.h builtin.h \ @@@ -398,14 -399,12 +401,14 @@@ ifeq ($(uname_S),Darwin NEEDS_LIBICONV = YesPlease OLD_ICONV = UnfortunatelyYes NO_STRLCPY = YesPlease + NO_MEMMEM = YesPlease endif ifeq ($(uname_S),SunOS) NEEDS_SOCKET = YesPlease NEEDS_NSL = YesPlease SHELL_PATH = /bin/bash NO_STRCASESTR = YesPlease + NO_MEMMEM = YesPlease NO_HSTRERROR = YesPlease ifeq ($(uname_R),5.8) NEEDS_LIBICONV = YesPlease @@@ -428,7 -427,6 +431,7 @@@ ifeq ($(uname_O),Cygwin NO_D_TYPE_IN_DIRENT = YesPlease NO_D_INO_IN_DIRENT = YesPlease NO_STRCASESTR = YesPlease + NO_MEMMEM = YesPlease NO_SYMLINK_HEAD = YesPlease NEEDS_LIBICONV = YesPlease NO_FAST_WORKING_DIRECTORY = UnfortunatelyYes @@@ -442,13 -440,11 +445,13 @@@ endif ifeq ($(uname_S),FreeBSD) NEEDS_LIBICONV = YesPlease + NO_MEMMEM = YesPlease BASIC_CFLAGS += -I/usr/local/include BASIC_LDFLAGS += -L/usr/local/lib endif ifeq ($(uname_S),OpenBSD) NO_STRCASESTR = YesPlease + NO_MEMMEM = YesPlease NEEDS_LIBICONV = YesPlease BASIC_CFLAGS += -I/usr/local/include BASIC_LDFLAGS += -L/usr/local/lib @@@ -463,7 -459,6 +466,7 @@@ ifeq ($(uname_S),NetBSD endif ifeq ($(uname_S),AIX) NO_STRCASESTR=YesPlease + NO_MEMMEM = YesPlease NO_STRLCPY = YesPlease NEEDS_LIBICONV=YesPlease endif @@@ -475,7 -470,6 +478,7 @@@ ifeq ($(uname_S),IRIX64 NO_IPV6=YesPlease NO_SETENV=YesPlease NO_STRCASESTR=YesPlease + NO_MEMMEM = YesPlease NO_STRLCPY = YesPlease NO_SOCKADDR_STORAGE=YesPlease SHELL_PATH=/usr/gnu/bin/bash @@@ -670,11 -664,12 +673,16 @@@ ifdef NO_HSTRERRO COMPAT_CFLAGS += -DNO_HSTRERROR COMPAT_OBJS += compat/hstrerror.o endif +ifdef NO_MEMMEM + COMPAT_CFLAGS += -DNO_MEMMEM + COMPAT_OBJS += compat/memmem.o +endif + ifdef THREADED_DELTA_SEARCH + BASIC_CFLAGS += -DTHREADED_DELTA_SEARCH + EXTLIBS += -lpthread + endif + ifeq ($(TCLTK_PATH),) NO_TCLTK=NoThanks endif