Skip to contentSkip to conversation

http-fetch: add optional DAV-based pack list

PATCH New Nick Hengeveld 1 participant 1 message Jun 15, 2016 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 http-fetch: add optional DAV-based pack list

If git is not built with NO_EXPAT, this patch changes git-http-fetch to attempt using DAV to get a list of remote packs and fall back to using objects/info/packs if the DAV request fails.

---

 Makefile     |    7 +
 http-fetch.c |  278 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 284 insertions(+), 1 deletions(-)

9aef9577cabbd96de20562902d2958108616a7e4

Makefile +6 -1
index c79d646..19ce42c 100644
@@ -510,6 +510,11 @@ git$X git.spec \
 exec_cmd.o: exec_cmd.c
 	$(CC) -o $*.o -c $(ALL_CFLAGS) '-DGIT_EXEC_PATH="$(gitexecdir_SQ)"' $<
 
+ifdef NO_EXPAT
+http-fetch.o: http-fetch.c
+	$(CC) -o $*.o -c $(ALL_CFLAGS) -DNO_EXPAT $<
+endif
+
 git-%$X: %.o $(GITLIBS)
 	$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
 
@@ -532,7 +537,7 @@ git-imap-send$X: imap-send.o $(LIB_FILE)
 
 git-http-fetch$X: fetch.o http.o http-fetch.o $(LIB_FILE)
 	$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
-		$(LIBS) $(CURL_LIBCURL)
+		$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
 
 git-http-push$X: revision.o http.o http-push.o $(LIB_FILE)
 	$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
http-fetch.c +278 -0

337 lines not on this page · raw message

Signature · 1 line
1.3.0.rc1.gd4df-dirty