Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Documentation/gitprotocol-capabilities.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,14 @@ fetch-pack may send "filter" commands to request a partial clone
or partial fetch and request that the server omit various objects
from the packfile.

bblob
-----

If the upload-pack server advertises the 'bblob' capability, it may
send packfiles containing bblob objects. Clients that do not
understand this object type must refrain from requesting the
capability.

session-id=<session-id>
-----------------------

Expand Down
139 changes: 70 additions & 69 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,7 @@ LIB_OBJS += base85.o
LIB_OBJS += bisect.o
LIB_OBJS += blame.o
LIB_OBJS += blob.o
LIB_OBJS += bblob.o
LIB_OBJS += bloom.o
LIB_OBJS += branch.o
LIB_OBJS += bulk-checkin.o
Expand Down Expand Up @@ -1466,7 +1467,7 @@ GIT-SPATCH-DEFINES: FORCE
if test x"$$FLAGS" != x"`cat GIT-SPATCH-DEFINES 2>/dev/null`" ; then \
echo >&2 " * new spatch flags"; \
echo "$$FLAGS" >GIT-SPATCH-DEFINES; \
fi
fi

include config.mak.uname
-include config.mak.autogen
Expand Down Expand Up @@ -1601,23 +1602,23 @@ ifneq (,$(SOCKLEN_T))
endif

ifeq ($(uname_S),Darwin)
ifndef NO_FINK
ifeq ($(shell test -d /sw/lib && echo y),y)
ifndef NO_FINK
ifeq ($(shell test -d /sw/lib && echo y),y)
BASIC_CFLAGS += -I/sw/include
BASIC_LDFLAGS += -L/sw/lib
endif
endif
ifndef NO_DARWIN_PORTS
ifeq ($(shell test -d /opt/local/lib && echo y),y)
endif
endif
ifndef NO_DARWIN_PORTS
ifeq ($(shell test -d /opt/local/lib && echo y),y)
BASIC_CFLAGS += -I/opt/local/include
BASIC_LDFLAGS += -L/opt/local/lib
endif
endif
ifndef NO_APPLE_COMMON_CRYPTO
endif
endif
ifndef NO_APPLE_COMMON_CRYPTO
NO_OPENSSL = YesPlease
APPLE_COMMON_CRYPTO = YesPlease
COMPAT_CFLAGS += -DAPPLE_COMMON_CRYPTO
endif
endif
PTHREAD_LIBS =
endif

Expand Down Expand Up @@ -1656,82 +1657,82 @@ ifdef NO_CURL
REMOTE_CURL_NAMES =
EXCLUDED_PROGRAMS += git-http-fetch git-http-push
else
ifdef CURLDIR
ifdef CURLDIR
# Try "-Wl,-rpath=$(CURLDIR)/$(lib)" in such a case.
CURL_CFLAGS = -I$(CURLDIR)/include
CURL_LIBCURL = $(call libpath_template,$(CURLDIR)/$(lib))
else
else
CURL_CFLAGS =
CURL_LIBCURL =
endif
endif

ifndef CURL_LDFLAGS
ifndef CURL_LDFLAGS
CURL_LDFLAGS = $(eval CURL_LDFLAGS := $$(shell $$(CURL_CONFIG) --libs))$(CURL_LDFLAGS)
endif
endif
CURL_LIBCURL += $(CURL_LDFLAGS)

ifndef CURL_CFLAGS
ifndef CURL_CFLAGS
CURL_CFLAGS = $(eval CURL_CFLAGS := $$(shell $$(CURL_CONFIG) --cflags))$(CURL_CFLAGS)
endif
endif
BASIC_CFLAGS += $(CURL_CFLAGS)

REMOTE_CURL_PRIMARY = git-remote-http$X
REMOTE_CURL_ALIASES = git-remote-https$X git-remote-ftp$X git-remote-ftps$X
REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES)
PROGRAM_OBJS += http-fetch.o
PROGRAMS += $(REMOTE_CURL_NAMES)
ifndef NO_EXPAT
ifndef NO_EXPAT
PROGRAM_OBJS += http-push.o
endif
endif
curl_check := $(shell (echo 072200; $(CURL_CONFIG) --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)
ifeq "$(curl_check)" "072200"
ifeq "$(curl_check)" "072200"
USE_CURL_FOR_IMAP_SEND = YesPlease
endif
ifdef USE_CURL_FOR_IMAP_SEND
endif
ifdef USE_CURL_FOR_IMAP_SEND
BASIC_CFLAGS += -DUSE_CURL_FOR_IMAP_SEND
IMAP_SEND_BUILDDEPS = http.o
IMAP_SEND_LDFLAGS += $(CURL_LIBCURL)
endif
ifndef NO_EXPAT
ifdef EXPATDIR
endif
ifndef NO_EXPAT
ifdef EXPATDIR
BASIC_CFLAGS += -I$(EXPATDIR)/include
EXPAT_LIBEXPAT = $(call libpath_template,$(EXPATDIR)/$(lib)) -lexpat
else
else
EXPAT_LIBEXPAT = -lexpat
endif
ifdef EXPAT_NEEDS_XMLPARSE_H
endif
ifdef EXPAT_NEEDS_XMLPARSE_H
BASIC_CFLAGS += -DEXPAT_NEEDS_XMLPARSE_H
endif
endif
endif
endif
endif
IMAP_SEND_LDFLAGS += $(OPENSSL_LINK) $(OPENSSL_LIBSSL) $(LIB_4_CRYPTO)

ifdef ZLIB_NG
BASIC_CFLAGS += -DHAVE_ZLIB_NG
ifdef ZLIB_NG_PATH
ifdef ZLIB_NG_PATH
BASIC_CFLAGS += -I$(ZLIB_NG_PATH)/include
EXTLIBS += $(call libpath_template,$(ZLIB_NG_PATH)/$(lib))
endif
endif
EXTLIBS += -lz-ng
else
ifdef ZLIB_PATH
ifdef ZLIB_PATH
BASIC_CFLAGS += -I$(ZLIB_PATH)/include
EXTLIBS += $(call libpath_template,$(ZLIB_PATH)/$(lib))
endif
endif
EXTLIBS += -lz
endif

ifndef NO_OPENSSL
OPENSSL_LIBSSL = -lssl
ifdef OPENSSLDIR
ifdef OPENSSLDIR
BASIC_CFLAGS += -I$(OPENSSLDIR)/include
OPENSSL_LINK = $(call libpath_template,$(OPENSSLDIR)/$(lib))
else
else
OPENSSL_LINK =
endif
ifdef NEEDS_CRYPTO_WITH_SSL
endif
ifdef NEEDS_CRYPTO_WITH_SSL
OPENSSL_LIBSSL += -lcrypto
endif
endif
else
BASIC_CFLAGS += -DNO_OPENSSL
OPENSSL_LIBSSL =
Expand All @@ -1749,18 +1750,18 @@ ifdef APPLE_COMMON_CRYPTO
endif
endif
ifndef NO_ICONV
ifdef NEEDS_LIBICONV
ifdef ICONVDIR
ifdef NEEDS_LIBICONV
ifdef ICONVDIR
BASIC_CFLAGS += -I$(ICONVDIR)/include
ICONV_LINK = $(call libpath_template,$(ICONVDIR)/$(lib))
else
else
ICONV_LINK =
endif
ifdef NEEDS_LIBINTL_BEFORE_LIBICONV
endif
ifdef NEEDS_LIBINTL_BEFORE_LIBICONV
ICONV_LINK += -lintl
endif
endif
EXTLIBS += $(ICONV_LINK) -liconv
endif
endif
endif
ifdef ICONV_OMITS_BOM
BASIC_CFLAGS += -DICONV_OMITS_BOM
Expand Down Expand Up @@ -1880,10 +1881,10 @@ ifdef NO_MMAP
COMPAT_CFLAGS += -DNO_MMAP
COMPAT_OBJS += compat/mmap.o
else
ifdef USE_WIN32_MMAP
ifdef USE_WIN32_MMAP
COMPAT_CFLAGS += -DUSE_WIN32_MMAP
COMPAT_OBJS += compat/win32mmap.o
endif
endif
endif
ifdef MMAP_PREVENTS_DELETE
BASIC_CFLAGS += -DMMAP_PREVENTS_DELETE
Expand Down Expand Up @@ -2008,11 +2009,11 @@ else
BASIC_CFLAGS += -DSHA1_DC
LIB_OBJS += sha1dc_git.o
ifdef DC_SHA1_EXTERNAL
ifdef DC_SHA1_SUBMODULE
ifneq ($(DC_SHA1_SUBMODULE),auto)
ifdef DC_SHA1_SUBMODULE
ifneq ($(DC_SHA1_SUBMODULE),auto)
$(error Only set DC_SHA1_EXTERNAL or DC_SHA1_SUBMODULE, not both)
endif
endif
endif
endif
BASIC_CFLAGS += -DDC_SHA1_EXTERNAL
EXTLIBS += -lsha1detectcoll
else
Expand Down Expand Up @@ -2218,26 +2219,26 @@ endif

ifdef RUNTIME_PREFIX

ifdef HAVE_BSD_KERN_PROC_SYSCTL
ifdef HAVE_BSD_KERN_PROC_SYSCTL
BASIC_CFLAGS += -DHAVE_BSD_KERN_PROC_SYSCTL
endif
endif

ifneq ($(PROCFS_EXECUTABLE_PATH),)
ifneq ($(PROCFS_EXECUTABLE_PATH),)
pep_SQ = $(subst ','\'',$(PROCFS_EXECUTABLE_PATH))
BASIC_CFLAGS += '-DPROCFS_EXECUTABLE_PATH="$(pep_SQ)"'
endif
endif

ifdef HAVE_NS_GET_EXECUTABLE_PATH
ifdef HAVE_NS_GET_EXECUTABLE_PATH
BASIC_CFLAGS += -DHAVE_NS_GET_EXECUTABLE_PATH
endif
endif

ifdef HAVE_ZOS_GET_EXECUTABLE_PATH
ifdef HAVE_ZOS_GET_EXECUTABLE_PATH
BASIC_CFLAGS += -DHAVE_ZOS_GET_EXECUTABLE_PATH
endif
endif

ifdef HAVE_WPGMPTR
ifdef HAVE_WPGMPTR
BASIC_CFLAGS += -DHAVE_WPGMPTR
endif
endif

endif

Expand Down Expand Up @@ -2595,7 +2596,7 @@ GIT-SCRIPT-DEFINES: FORCE
if test x"$$FLAGS" != x"`cat $@ 2>/dev/null`" ; then \
echo >&2 " * new script parameters"; \
echo "$$FLAGS" >$@; \
fi
fi

$(SCRIPT_SH_GEN) $(SCRIPT_LIB) : % : %.sh generate-script.sh GIT-BUILD-OPTIONS GIT-SCRIPT-DEFINES
$(QUIET_GEN)./generate-script.sh "$<" "$@+" ./GIT-BUILD-OPTIONS && \
Expand Down Expand Up @@ -2936,7 +2937,7 @@ Documentation/GIT-EXCLUDED-PROGRAMS: FORCE
x"`cat Documentation/GIT-EXCLUDED-PROGRAMS 2>/dev/null`" ; then \
echo >&2 " * new documentation flags"; \
echo "$$EXCLUDED" >Documentation/GIT-EXCLUDED-PROGRAMS; \
fi
fi

.PHONY: doc man man-perl html info pdf
doc: man-perl
Expand Down Expand Up @@ -3172,7 +3173,7 @@ GIT-CFLAGS: FORCE
if test x"$$FLAGS" != x"`cat GIT-CFLAGS 2>/dev/null`" ; then \
echo >&2 " * new build flags"; \
echo "$$FLAGS" >GIT-CFLAGS; \
fi
fi

TRACK_LDFLAGS = $(subst ','\'',$(ALL_LDFLAGS))

Expand All @@ -3181,7 +3182,7 @@ GIT-LDFLAGS: FORCE
if test x"$$FLAGS" != x"`cat GIT-LDFLAGS 2>/dev/null`" ; then \
echo >&2 " * new link flags"; \
echo "$$FLAGS" >GIT-LDFLAGS; \
fi
fi

ifdef RUNTIME_PREFIX
RUNTIME_PREFIX_OPTION = true
Expand Down Expand Up @@ -3256,7 +3257,7 @@ GIT-PYTHON-VARS: FORCE
if test x"$$VARS" != x"`cat $@ 2>/dev/null`" ; then \
echo >&2 " * new Python interpreter location"; \
echo "$$VARS" >$@; \
fi
fi
endif

test_bindir_programs := $(patsubst %,bin-wrappers/%,$(BINDIR_PROGRAMS_NEED_X) $(BINDIR_PROGRAMS_NO_X) $(TEST_PROGRAMS_NEED_X))
Expand Down Expand Up @@ -3927,7 +3928,7 @@ GIT-TEST-SUITES: FORCE
if test x"$$FLAGS" != x"`cat GIT-TEST-SUITES 2>/dev/null`" ; then \
echo >&2 " * new test suites"; \
echo "$$FLAGS" >GIT-TEST-SUITES; \
fi
fi

$(UNIT_TEST_DIR)/clar-decls.h: $(patsubst %,$(UNIT_TEST_DIR)/%.c,$(CLAR_TEST_SUITES)) $(UNIT_TEST_DIR)/generate-clar-decls.sh GIT-TEST-SUITES
$(QUIET_GEN)$(SHELL_PATH) $(UNIT_TEST_DIR)/generate-clar-decls.sh "$@" $(filter %.c,$^)
Expand Down
8 changes: 8 additions & 0 deletions alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "git-compat-util.h"
#include "object.h"
#include "blob.h"
#include "bblob.h"
#include "tree.h"
#include "commit.h"
#include "repository.h"
Expand Down Expand Up @@ -77,6 +78,13 @@ void *alloc_blob_node(struct repository *r)
return b;
}

void *alloc_bblob_node(struct repository *r)
{
struct bblob *bb = alloc_node(r->parsed_objects->blob_state, sizeof(struct bblob));
bb->object.type = OBJ_BBLOB;
return bb;
}

void *alloc_tree_node(struct repository *r)
{
struct tree *t = alloc_node(r->parsed_objects->tree_state, sizeof(struct tree));
Expand Down
1 change: 1 addition & 0 deletions alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ struct tag;
struct repository;

void *alloc_blob_node(struct repository *r);
void *alloc_bblob_node(struct repository *r);
void *alloc_tree_node(struct repository *r);
void init_commit_node(struct commit *c);
void *alloc_commit_node(struct repository *r);
Expand Down
Loading
Loading