What's in git.git
* The 'master' branch has these since the last announcement. Since it was tagged as 1.4.2-rc3, it has acquired a couple of further fixes. Hopefully there won't be anything but fixes on this branch until the real 1.4.2 happens.
- Documentation, usage string fixes and general clean-ups everywhere by Jeff King, Ramsay Allan Jones, Uwe Zeisberger, and Matthias Lederhofer.
- A few more commands are made built-ins by Matthias Kestenholz.
- A minor memory leak in git-tar-tree was plugged by Rene Scharfe.
- Ramsay Allan Jones has introduced "NO_C99_FORMAT" Makefile variable to help running things with a C library that does not support %zu and %td format. This would be a good target for autoconf work by Jakub (hint hint).
- To make it easy to tell which side of the connection the errors happened while fetching/pulling, messages from the remote side are prefixed with "remote: ".
- "git diff blob1 blob2" were showing the patch in reverse, and did not identify blob names of both sides. Fixed.
- "git commit -o path" from subdirectories were broken when git-read-tree became a built-in. Fixed.
* The 'next' branch, in addition, has these.
- A big gitweb clean-up series by Jakub Narebski, with help from Jeff King, Matthias Lederhofer and Martin Waitz to make run-time and build-time configuration easier.
- Jakub Narebski made config.mak.autogen to tell where Perl and Python are to the build system.
- Not-universally-liked Git.pm by Pasky with help from Dennis Stosberg, Johannes Schindelin, Pavel Roskin and others. One drawback is this pretty much makes Perl scripts that use Git.pm unusable with ActiveState right now.
- A new merge strategy, merge-recur, which is a rewrite of merge-recursive in C, by Johannes and Alex.
- More commands are made built-in by Matthias Kestenholz, and I cleaned up the build procedure for built-ins a bit.
- New style loose objects, which use the same header format as in-pack objects, can be copied straight into packs when not deltified. Note that new-style loose objects are not enabled by default yet.
- Matthias Lederhofer introduced $GIT_PAGER environment variable that can specify a different pager from $PAGER.
- I suspect Cygwin needs NO_C99_FORMAT. Confirmation is appreciated.
- Ramsay Allan Jones has one header fix to add _GNU_SOURCE, which helps things to compile in his environment; this needs to be checked to make sure it does not break others.
- Timo Hirvonen made the parameter parsing of diff family saner some time ago. Two minor changes are waiting to graduate to "master" after 1.4.2:
* --name-only, --name-status, --check and -s are mutually exclusive
* Remove awkward compatibility warts "-s". Now -s means "do not output diff" everywhere, including git-diff-files.
* The 'pu' branch, in addition, has these.
- Johannes Schindelin has a new diff option --color-words to use color to squash word differences into single line output.
- An update to upload-pack to prevent it from going all the way back when the downloader has more roots than it. Needs testing and comments.
- A new merge strategy, merge-rename, which is still a work-in-progress to handle renames in read-tree 3-way merge.
PATCH 1/4 autoconf: Check for working mmap
Use AC_FUNC_MMAP check to check if the `mmap' function exists and works correctly. (It only checks private fixed mapping of already-mapped memory.)
Attention: uses implementation detail of AC_FUNC_MMAP!
--- configure.ac | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
configure.ac +4 -0
@@ -208,6 +208,10 @@ AC_CHECK_FUNC(setenv,[], [GIT_CONF_APPEND_LINE(NO_SETENV=YesPlease)]) # # Define NO_MMAP if you want to avoid mmap. +AC_FUNC_MMAP +if test $ac_cv_func_mmap_fixed_mapped != yes; then + GIT_CONF_APPEND_LINE(NO_MMAP=YesPlease) +fi # # Define NO_IPV6 if you lack IPv6 support and getaddrinfo(). #
Signature · 1 line
1.4.1.1
Re: [PATCH 1/4] autoconf: Check for working mmap
Quoted 3 lines · Jakub Narebski
Use
AC_FUNC_MMAPcheck to check if the `mmap' function exists and works correctly. (It only checks private fixed mapping of already-mapped memory.)
This tests something we do not really care about (we do not mmap MAP_FIXED, and not over an already allocated space).
Re: [PATCH 1/4] autoconf: Check for working mmap
Quoted 8 lines · Junio C Hamano
Quoted 3 lines · Jakub Narebski
Use
AC_FUNC_MMAPcheck to check if the `mmap' function exists and works correctly. (It only checks private fixed mapping of already-mapped memory.)This tests something we do not really care about (we do not mmap
MAP_FIXED, and not over an already allocated space).
Well, I have noticed that there exist AC_FUNC_MMAP, used it, then read about its limitations.
Is there any platform that passes this test, but needs NO_MMAP? If so, then disregard this patch.
Signature · 3 lines
Jakub Narebski Warsaw, Poland ShadeHawk on #git
PATCH 2/4 autoconf: Check for ll hh j z t size specifiers introduced by C99
In reply to Junio C HamanoAdd custom test for checking whether formatted IO functions (printf/scanf et.al.) support 'size specifiers' introduced by C99, namely ll, hh, j, z, t. (representing long long int, char, intmax_t, size_t, ptrdiff_t).
--- configure.ac | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-)
configure.ac +21 -0
@@ -189,6 +189,27 @@ # sockaddr_storage. AC_CHECK_TYPE(struct sockaddr_storage,[], [GIT_CONF_APPEND_LINE(NO_SOCKADDR_STORAGE=YesPlease)], [#include <netinet/in.h>]) +# +# Define NO_C99_FORMAT if your formatted IO functions (printf/scanf et.al.) +# do not support the 'size specifiers' introduced by C99, namely ll, hh, +# j, z, t. (representing long long int, char, intmax_t, size_t, ptrdiff_t). +# some C compilers supported these specifiers prior to C99 as an extension. +AC_CACHE_CHECK(whether IO functions support %ll %hh %j %z %t size specifiers, + ac_cv_c_c99_format, +[# Actually git uses only %z (%zu) in alloc.c, and %t (%td) in mktag.c +AC_RUN_IFELSE( + [AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], + [[char buf[64]; + if (sprintf(buf, "%lld%hhd%jd%zd%td", (long long int)1, (char)2, (intmax_t)3, (size_t)4, (ptrdiff_t)5) != 5) + exit(1); + else if (strcmp(buf, "12345")) + exit(2);]])], + [ac_cv_c_c99_format=yes], + [ac_cv_c_c99_format=no]) +]) +if test $ac_cv_c_c99_format = no; then + GIT_CONF_APPEND_LINE(NO_C99_FORMAT=YesPlease) +fi ## Checks for library functions.
Signature · 1 line
1.4.1.1
PATCH 3/4 autoconf: Typo cleanup, reordering etc.
In reply to Junio C Hamano--- Makefile | 2 +- configure.ac | 43 +++++++++++++++++++++++-------------------- 2 files changed, 24 insertions(+), 21 deletions(-)
Makefile +1 -1
@@ -22,7 +22,7 @@ # # Define NO_C99_FORMAT if your formatted IO functions (printf/scanf et.al.) # do not support the 'size specifiers' introduced by C99, namely ll, hh, # j, z, t. (representing long long int, char, intmax_t, size_t, ptrdiff_t). -# some c compilers supported these specifiers prior to C99 as an extension. +# some C compilers supported these specifiers prior to C99 as an extension. # # Define NO_STRCASESTR if you don't have strcasestr. #
configure.ac +23 -20
71 lines not on this page · raw message
Signature · 1 line
1.4.1.1
PATCH 4/4 Copy description of new build configuration variables to configure.ac
In reply to Junio C HamanoCopy description of new build configuration variables from the commentary in the top Makefile, namely NO_FINK and NO_DARWIN_PORTS configuration variables, putting them in site configuration section.
--- configure.ac | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
configure.ac +12 -0
@@ -79,6 +79,18 @@ # # Define NO_EXPAT if you do not have expat installed. git-http-push is # not built, and you cannot push using http:// and https:// transports. # +# Define NO_FINK if you are building on Darwin/Mac OS X, have Fink +# installed in /sw, but don't want GIT to link against any libraries +# installed there. If defined you may specify your own (or Fink's) +# include directories and library directories by defining CFLAGS +# and LDFLAGS appropriately. +# +# Define NO_DARWIN_PORTS if you are building on Darwin/Mac OS X, +# have DarwinPorts installed in /opt/local, but don't want GIT to +# link against any libraries installed there. If defined you may +# specify your own (or DarwinPort's) include directories and +# library directories by defining CFLAGS and LDFLAGS appropriately. +# # Define NO_MMAP if you want to avoid mmap. # # Define SHELL_PATH to provide path to shell.
Signature · 1 line
1.4.1.1
Hi,
Quoted 2 lines · Junio C Hamano
- I suspect Cygwin needs
NO_C99_FORMAT. Confirmation is appreciated.
I can confirm that a just update cygwin setup needs it.
Ciao,
Dscho
Quoted 4 lines · Junio C Hamano
- Not-universally-liked Git.pm by Pasky with help from Dennis Stosberg, Johannes Schindelin, Pavel Roskin and others. One drawback is this pretty much makes Perl scripts that use Git.pm unusable with ActiveState right now.
It would be nice if when compiling with NO_GIT_XS (or equivalent) defined, Git.pm used pure Perl implementation. It would be even better if we could avoid unnecessary code repetition.
I think it would solve (read: paper on the problem) ActiveState problem...
Signature · 3 lines
Jakub Narebski Warsaw, Poland ShadeHawk on #git
Quoted 4 lines · Junio C Hamano
- Ramsay Allan Jones has introduced "
NO_C99_FORMAT"Makefilevariable to help running things with a C library that does not support %zu and %td format. This would be a good target for autoconf work by Jakub (hint hint).
See [PATCH 2/4] in this thread (introductory message somehow got lost). Testing on system which doesn't have C99 format specifiers would be appreciated.
Signature · 3 lines
Jakub Narebski Warsaw, Poland ShadeHawk on #git
Quoted 10 lines · Jakub Narebski
Quoted 4 lines · Junio C Hamano
- Ramsay Allan Jones has introduced "
NO_C99_FORMAT"Makefilevariable to help running things with a C library that does not support %zu and %td format. This would be a good target for autoconf work by Jakub (hint hint).See [PATCH 2/4] in this thread (introductory message somehow got lost). Testing on system which doesn't have C99 format specifiers would be appreciated.
Running generated configure script on Cygwin just updated reports NO_C99_FORMAT is needed. This is consistent with what Johannes confirmed.
Thanks, both.
Quoted 3 lines · Junio C Hamano
Running generated configure script on Cygwin just updated reports
NO_C99_FORMATis needed. This is consistent with what Johannes confirmed.
BTW, my copy of config.mak.autogen generated on Cygwin says:
NO_D_INO_IN_DIRENT
NO_D_TYPE_IN_DIRENT
NO_C99_FORMAT
NO_STRCASESTR
NO_OPENSSL ???The defaults in our Makefile are:
NO_D_INO_IN_DIRENT
NO_D_TYPE_IN_DIRENT
NO_STRCASESTR
NO_STRLCPY ???
NEEDS_LIBICONV ???
NO_C99_FORMAT
NO_IPV6 ???(1) configure misdetects NO_OPENSSL. The relevant parts are:
checking for SHA1_Init in -lssl... no
checking for SHA1_INIT in -lcrypto... no
but I've been building git on Cygwin without NO_OPENSSL (eh, that's double negation -- what I mean is I've been building git with -lssl just fine). I think the function to check in -lcrypto should be SHA1_Init, not SHA1_INIT (trivial patch attached at the end).
(2) NO_STRLCPY is detected to be available by configure. I think we should update the default in Makefile.
(3) NEEDS_LIBICONV is found to be unnecessary by configure, but the link fails like this without it:
builtin-mailinfo.o: In function `convert_to_utf8':
/git/builtin-mailinfo.c:539: undefined reference to _libiconv_open' /git/builtin-mailinfo.c:560: undefined reference to _libiconv' /git/builtin-mailinfo.c:561: undefined reference to `_libiconv_close'
collect2: ld returned 1 exit status
(4) NO_IPV6 is not detected yet -- you should be able to detect this by checking for "struct addrinfo". The compilation fails like this on Cygwin:
connect.c: In function `git_tcp_connect_sock':
connect.c:361: error: storage size of 'hints' isn't known
(Z) When configure detects some NO_XXX is unneeded, currently there is no way for generated config.mak.autogen to override the default set in Makefile. For example, NO_STRLCPY is set by Makefile, and the included config.mak.autogen does not say anything about it even though it knows strlcpy is usable. It might be better to explicitly undef unneeded NO_XXX in config.mak.autogen?
-- >8 --
autoconf: typofix to detect SHA1_Init in -lcrypto
---
configure.ac +1 -1
@@ -155,7 +155,7 @@ # # Define NO_OPENSSL environment variable if you do not have OpenSSL. # Define NEEDS_SSL_WITH_CRYPTO if you need -lcrypto with -lssl (Darwin). AC_CHECK_LIB([ssl], [SHA1_Init],[], -[AC_CHECK_LIB([crypto], [SHA1_INIT], +[AC_CHECK_LIB([crypto], [SHA1_Init], [GIT_CONF_APPEND_LINE(NEEDS_SSL_WITH_CRYPTO=YesPlease)], [GIT_CONF_APPEND_LINE(NO_OPENSSL=YesPlease)])]) #
Quoted 10 lines · Junio C Hamano
(1) configure misdetects
NO_OPENSSL. The relevant parts are:checking for
SHA1_Initin -lssl... no
checking forSHA1_INITin -lcrypto... nobut I've been building git on Cygwin without
NO_OPENSSL(eh, that's double negation -- what I mean is I've been building git with -lssl just fine). I think the function to check in -lcrypto should beSHA1_Init, notSHA1_INIT(trivial patch attached at the end).
I just noticed that this is not enough. It does fix the NO_OPENSSL problem, but I think the logic and test for ssl and crypto in the original are the other way around.
NEEDS_SSL_WITH_CRYPTO means you cannot just say "-lcrypto" to use SHA1 stuff, but need to say "-lcrypto -lssl", so the test should say "if we can get away with -lcrypto, we are happy, otherwise if we need -lssl, then say NEEDS_SSL_WITH_CRYPTO, otherwise we cannot use OpenSSL so say NO_OPENSSL", or something like that.
-- >8 --
configure.ac +2 -2
@@ -154,8 +154,8 @@ AC_MSG_NOTICE([CHECKS for libraries]) # # Define NO_OPENSSL environment variable if you do not have OpenSSL. # Define NEEDS_SSL_WITH_CRYPTO if you need -lcrypto with -lssl (Darwin). -AC_CHECK_LIB([ssl], [SHA1_Init],[], -[AC_CHECK_LIB([crypto], [SHA1_INIT], +AC_CHECK_LIB([crypto], [SHA1_Init],[], +[AC_CHECK_LIB([ssl], [SHA1_Init], [GIT_CONF_APPEND_LINE(NEEDS_SSL_WITH_CRYPTO=YesPlease)], [GIT_CONF_APPEND_LINE(NO_OPENSSL=YesPlease)])]) #
Quoted 8 lines · Junio C Hamano
(3)
NEEDS_LIBICONVis found to be unnecessary by configure, but the link fails like this without it:builtin-mailinfo.o: In function `convert_to_utf8':
/git/builtin-mailinfo.c:539: undefined reference to_libiconv_open' /git/builtin-mailinfo.c:560: undefined reference to_libiconv' /git/builtin-mailinfo.c:561: undefined reference to `_libiconv_close'
collect2: ld returned 1 exit status
Does the following patch help?
+++
autoconf: Set NEEDS_LIBICONV unconditionally if there is no iconv in libc
--- configure.ac | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
configure.ac +1 -2
@@ -172,8 +172,7 @@ AC_CHECK_LIB([expat], [XML_ParserCreate] # # Define NEEDS_LIBICONV if linking with libc is not enough (Darwin). AC_CHECK_LIB([c], [iconv],[], -[AC_CHECK_LIB([iconv],[iconv], - [GIT_CONF_APPEND_LINE(NEEDS_LIBICONV=YesPlease)],[])]) +[GIT_CONF_APPEND_LINE(NEEDS_LIBICONV=YesPlease)]) # # Define NEEDS_SOCKET if linking with libc is not enough (SunOS, # Patrick Mauritz).
Signature · 1 line
1.4.1.1