path: root/Makefile
diff options
authorJunio C Hamano <>2005-07-24 00:54:41 (GMT)
committerLinus Torvalds <>2005-07-24 01:28:19 (GMT)
commit8f3f9b09dc5ac8a946422422c3c70a4a4c284be3 (patch)
treea237b1468702dce4d5cd41258d4b8a8ea0976896 /Makefile
parent0fec0822721cc18d6a62ab78da1ebf87914d4921 (diff)
[PATCH] Add update-server-info.
The git-update-server-info command prepares informational files to help clients discover the contents of a repository, and pull from it via a dumb transport protocols. Currently, the following files are produced. - The $repo/info/refs file lists the name of heads and tags available in the $repo/refs/ directory, along with their SHA1. This can be used by git-ls-remote command running on the client side. - The $repo/info/rev-cache file describes the commit ancestry reachable from references in the $repo/refs/ directory. This file is in an append-only binary format to make the server side friendly to rsync mirroring scheme, and can be read by git-show-rev-cache command. - The $repo/objects/info/pack file lists the name of the packs available, the interdependencies among them, and the head commits and tags contained in them. Along with the other two files, this is designed to help clients to make smart pull decisions. The git-receive-pack command is changed to invoke it at the end, so just after a push to a public repository finishes via "git push", the server info is automatically updated. In addition, building of the rev-cache file can be done by a standalone git-build-rev-cache command separately. Signed-off-by: Junio C Hamano <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'Makefile')
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 9d30000..6933ae3 100644
--- a/Makefile
+++ b/Makefile
@@ -50,7 +50,8 @@ PROG= git-update-cache git-diff-files git-init-db git-write-tree \
git-diff-stages git-rev-parse git-patch-id git-pack-objects \
git-unpack-objects git-verify-pack git-receive-pack git-send-pack \
git-prune-packed git-fetch-pack git-upload-pack git-clone-pack \
- git-show-index git-daemon git-var git-peek-remote
+ git-show-index git-daemon git-var git-peek-remote \
+ git-update-server-info git-show-rev-cache git-build-rev-cache
all: $(PROG)
@@ -65,6 +66,9 @@ LIB_FILE=libgit.a
LIB_H=cache.h object.h blob.h tree.h commit.h tag.h delta.h epoch.h csum-file.h \
pack.h pkt-line.h refs.h
+LIB_H += rev-cache.h
+LIB_OBJS += rev-cache.o
LIB_H += strbuf.h
LIB_OBJS += strbuf.o
@@ -76,6 +80,7 @@ LIB_OBJS += diff.o diffcore-rename.o diffcore-pickaxe.o diffcore-pathspec.o \
count-delta.o diffcore-break.o diffcore-order.o
LIB_OBJS += gitenv.o
+LIB_OBJS += server-info.o
LIBS += -lz
@@ -152,6 +157,9 @@ git-prune-packed: prune-packed.c
git-fetch-pack: fetch-pack.c
git-var: var.c
git-peek-remote: peek-remote.c
+git-update-server-info: update-server-info.c
+git-build-rev-cache: build-rev-cache.c
+git-show-rev-cache: show-rev-cache.c
git-http-pull: LIBS += -lcurl
git-rev-list: LIBS += -lssl
@@ -165,6 +173,7 @@ object.o: $(LIB_H)
read-cache.o: $(LIB_H)
sha1_file.o: $(LIB_H)
usage.o: $(LIB_H)
+rev-cache.o: $(LIB_H)
strbuf.o: $(LIB_H)
gitenv.o: $(LIB_H)
entry.o: $(LIB_H)