On Fri, Jul 24, 2009 at 03:13:07PM -0700, Linus Torvalds wrote:
Subject: [PATCH] git-http-fetch: not a builtin
We should really try to avoid having a dependency on the curl libraries
for the core 'git' executable. It adds huge overheads, for no advantage.
This splits up git-http-fetch so that it isn't built-in. We still do
end up linking with curl for the git binary due to the transport.c http
walker, but that's at least partially an independent issue.
[...]
+git-http-fetch$X: revision.o http.o http-push.o $(GITLIBS)
+ $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
+ $(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
Err, this seems to horribly break git-http-fetch (see if you can spot
the logic error in dependencies). Patch is below.
Nobody noticed, I expect, because nothing in git _uses_ http-fetch
anymore, now that git-clone is no longer a shell script. I only noticed
because it tried to build http-push on one of my NO_EXPAT machines.
It might be an interesting exercise to dust off the old shell scripts
once in a while and see if they still pass their original tests while
running on top of a more modern git. It would test that we haven't
broken the plumbing interfaces.
-- >8 --
Subject: [PATCH] Makefile: build http-fetch against http-fetch.o
As opposed to http-push.o. We can also drop EXPAT_LIBEXPAT,
since fetch does not need it.
This appears to be a bad cut-and-paste in commit 1088261f.
Signed-off-by: Jeff King <redacted>
---
Makefile | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 97d904b..d6362d3 100644
--- a/Makefile
+++ b/Makefile
@@ -1502,9 +1502,9 @@ http.o http-walker.o http-push.o: http.h
http.o http-walker.o: $(LIB_H)
-git-http-fetch$X: revision.o http.o http-push.o $(GITLIBS)
+git-http-fetch$X: revision.o http.o http-fetch.o http-walker.o $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
- $(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
+ $(LIBS) $(CURL_LIBCURL)
git-http-push$X: revision.o http.o http-push.o $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
--
1.6.4.117.g6056d.dirty