threads / discuss / 2363

What's in git.git tonight

Subject: What's in git.git tonight

## tl;dr

10 messages between Nov 6, 2005 and Nov 6, 2005.

replies: 9people: 5as markdown or json

Junio C Hamano· Nov 6, 2005, 10:00 UTC · lore
Here are the things merged to "master" so far:
 - The first part of the http-push over DAV; git-push frontend
   is not aware of it yet; interested people please try it out
   with git-http-push and send thanks-it-works messages to Nick.
 - Overriding CFLAGS from make command line did not quite work
   if you were on a platform that needed to acquire platform
   specific defines from the Makefile.  Hopefully this has been
   fixed.
 - My attempt to split the Debian binary package into multiple
   ones.
 - Some documentation fixes.
 - A fix to format-patch.
In the proposed updates branch:
 - svnimport fixes from Yaacov; svnimport users please either
   Ack or report regression.
 - 'git binary directory' changes, started by Linus.  I am
   running with gitdir != bindir configuration on my machine and
   it seems to work, but I'd want wider audience to test this.
   Note that the Debian binary packages have not been adjusted
   for this change yet.
 - A 'git clone' change to fully populate remotes/origin; this
   is more or less an RFC item; likes?  dislikes?
 - A change to git-push to allow push-over-http-DAV.  I'd like
   to push this part out after I hear success stories from
   people on the first half.

I plan to do a 0.99.9e Sunday night with the tip of "master" (wherever it will be by that time).

Randal L. Schwartz· Nov 6, 2005, 10:54 UTC · re: Junio C Hamano · lore

Re: What's in git.git tonight

http-push.c no longer compiles on OSX:

gcc -o http-push.o -c -g -O2 -Wall -DSHA1_HEADER='<openssl/sha.h>' http-push.c http-push.c:10:19: error: expat.h: No such file or directory http-push.c:1113: warning: type defaults to 'int' in declaration of 'XML_Char' http-push.c:1113: error: parse error before '*' token http-push.c: In function 'activelock_cdata': http-push.c:1115: error: 'userData' undeclared (first use in this function) http-push.c:1115: error: (Each undeclared identifier is reported only once http-push.c:1115: error: for each function it appears in.) http-push.c:1116: error: 'len' undeclared (first use in this function) http-push.c:1117: error: 's' undeclared (first use in this function) http-push.c: In function 'lock_remote': http-push.c:1187: error: 'XML_Parser' undeclared (first use in this function) http-push.c:1187: error: parse error before 'parser' http-push.c:1188: error: storage size of 'result' isn't known http-push.c:1276: warning: implicit declaration of function 'XML_SetUserData' http-push.c:1276: error: 'parser' undeclared (first use in this function) http-push.c:1277: warning: implicit declaration of function 'XML_SetElementHandler' http-push.c:1279: warning: implicit declaration of function 'XML_SetCharacterDataHandler' http-push.c:1280: warning: implicit declaration of function 'XML_Parse' http-push.c:1282: error: 'XML_STATUS_OK' undeclared (first use in this function) http-push.c:1283: warning: implicit declaration of function 'XML_ErrorString' http-push.c:1284: warning: implicit declaration of function 'XML_GetErrorCode' http-push.c:1284: warning: format '%s' expects type 'char *', but argument 3 has type 'int' http-push.c:1188: warning: unused variable 'result' http-push.c: In function 'check_locking': http-push.c:1353: error: 'XML_Parser' undeclared (first use in this function) http-push.c:1353: error: parse error before 'parser' http-push.c:1354: error: storage size of 'result' isn't known http-push.c:1392: error: 'parser' undeclared (first use in this function) http-push.c:1397: error: 'XML_STATUS_OK' undeclared (first use in this function) http-push.c:1399: warning: format '%s' expects type 'char *', but argument 2 has type 'int' http-push.c:1354: warning: unused variable 'result'

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Paul Collins· Nov 6, 2005, 11:57 UTC · re: Randal L. Schwartz · lore

Re: What's in git.git tonight

merlyn@stonehenge.com (Randal L. Schwartz) writes:
> http-push.c no longer compiles on OSX:

It seems to require libexpat now. I got the same error here on Debian. With libexpat-dev installed it builds.

-- 
Dag vijandelijk luchtschip de huismeester is dood
Randal L. Schwartz· Nov 6, 2005, 12:08 UTC · re: Paul Collins · lore

Re: What's in git.git tonight

>>>>> "Paul" == Paul Collins <paul@briny.ondioline.org> writes:

Paul> It seems to require libexpat now. I got the same error here on Debian. Paul> With libexpat-dev installed it builds.

Well, there's no standard libexpat for OSX, so if you install it after-market, it can end up in various directories.

For example, on my machine, I've installed it with fink, so I need "-I/sw/include -L/sw/lib" added to CFLAGS.

If you install it with darwinports, it will end up under "/opt/local/{lib,include}" instead.

I suppose you could add those four things to CFLAGS for OSX and it won't mess too many things up, but you'll also need to add a note that says "git requires expat, which can be obtained through fink or darwinports. If you install expat manually, you may have to adjust CFLAGS in the Makefile".

As a separate problem, why make git depend on expat if the only part of this is for DAV pushing? Can http-push simply refuse DAV URLs if built without expat?

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Randal L. Schwartz· Nov 6, 2005, 12:33 UTC · re: Randal L. Schwartz · lore

Re: What's in git.git tonight

>>>>> "Randal" == Randal L Schwartz <merlyn@stonehenge.com> writes:

Randal> As a separate problem, why make git depend on expat if the only part Randal> of this is for DAV pushing? Can http-push simply refuse DAV URLs if Randal> built without expat?

Ignore that.  Yes, defining "NO_EXPAT" is enough.  Didn't notice that there.

And, I've confirmed that this patch does the trick, and will probably defer any other issues with "optional" packages in the future:

diff --git a/Makefile b/Makefile
index 6f9b0d1..f89e0bd 100644
--- a/Makefile
+++ b/Makefile
@@ -185,6 +185,10 @@ uname_O := $(shell sh -c 'uname -o 2>/de
 ifeq ($(uname_S),Darwin)
        NEEDS_SSL_WITH_CRYPTO = YesPlease
        NEEDS_LIBICONV = YesPlease
+       ## fink
+       ALL_CFLAGS += -I/sw/include -L/sw/lib
+       ## darwinports
+       ALL_CFLAGS += -I/opt/local/include -L/opt/local/lib
 endif
 ifeq ($(uname_S),SunOS)
        NEEDS_SOCKET = YesPlease

Note that whitespace may have been eaten... this was a cut-n-paste.
-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Junio C Hamano· Nov 6, 2005, 18:47 UTC · re: Randal L. Schwartz · lore

Re: What's in git.git tonight

merlyn@stonehenge.com (Randal L. Schwartz) writes:
> And, I've confirmed that this patch does the trick, and will probably
> defer any other issues with "optional" packages in the future:
Thanks.  Next time around could you sign-off your patch?
Paul Collins· Nov 6, 2005, 21:07 UTC · re: Junio C Hamano · lore

Re: What's in git.git tonight

Junio C Hamano <junkio@cox.net> writes:
Show 6 quoted lines
> merlyn@stonehenge.com (Randal L. Schwartz) writes:
>
>> And, I've confirmed that this patch does the trick, and will probably
>> defer any other issues with "optional" packages in the future:
>
> Thanks.  Next time around could you sign-off your patch?
A tiny nit:
---

Consistency is the hobgoblin of small minds, and mine is tiny indeed. Do not search the current directory when including expat.h, since it is not supplied by git.

Signed-off-by: Paul Collins <paul@briny.ondioline.org>
diff --git a/http-push.c b/http-push.c
index c10067c..89fda42 100644
--- a/http-push.c
+++ b/http-push.c
@@ -7,7 +7,7 @@
 
 #include <curl/curl.h>
 #include <curl/easy.h>
-#include "expat.h"
+#include <expat.h>
 
 static const char http_push_usage[] =
 "git-http-push [--complete] [--force] [--verbose] <url> <ref> [<ref>...]\n";
-- 
Dag vijandelijk luchtschip de huismeester is dood
Marco Roeland· Nov 6, 2005, 12:11 UTC · re: Randal L. Schwartz · lore

Re: What's in git.git tonight

On Sunday November 6th 2005 at 02:54 uur Randal L. Schwartz wrote:
Show 5 quoted lines
> 
> http-push.c no longer compiles on OSX:
> 
> gcc -o http-push.o -c -g -O2 -Wall -DSHA1_HEADER='<openssl/sha.h>' http-push.c
> http-push.c:10:19: error: expat.h: No such file or directory

You need to have the expat (XML parsing library) header files installed from something like the "expat development kit".

If you do already have 'expat.h' installed under say /usr/include does changing "#include "expat.h" to "#include <expat.h>" perhaps help? Searching for include files specified with #include "..." is somewhat platform dependant.

Alternatively, if you don't need 'git-http-push' you can define 'NO_EXPAT' and the Makefile will take care that it doesn't get built.

Incidentally 'git whatchanged -p http-push.c' shows that this dependency on expat and its include header has been there since the first version on November 2nd. So 'no longer compiles' seems a bit odd!

-- 
Marco Roeland
Randal L. Schwartz· Nov 6, 2005, 12:24 UTC · re: Marco Roeland · lore

Re: What's in git.git tonight

>>>>> "Marco" == Marco Roeland <marco.roeland@xs4all.nl> writes:

Marco> Incidentally 'git whatchanged -p http-push.c' shows that this dependency Marco> on expat and its include header has been there since the first version Marco> on November 2nd. So 'no longer compiles' seems a bit odd!

I haven't built since nov 2.  Sorry, bit distracted with a conference. :)
-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

← back to recent threads