* Re: Trying to understand the web dav details
From: Jeff King @ 2013-01-06 4:19 UTC (permalink / raw)
To: Jason Pyeron; +Cc: 'git'
In-Reply-To: <151C51E6FBD848739A43A2C17D78DD68@black>
On Sat, Jan 05, 2013 at 08:32:09PM -0500, Jason Pyeron wrote:
> When doing a clone by https (reverse proxied to http) the first request is
>
> GET /git/project/info/refs?service=git-upload-pack
>
> How does the ?service=xxxx get translated in to the action performed on the web
> server?
If you are using the git-http-backend CGI, it will interpret the service
tag and start smart-http. See "git help http-backend" for details on
plugging it into Apache.
Cloning/fetching does not use DAV at all; it is only for non-smart
pushing (and I would not recommend setting it up; the smart protocol
spoken by git-http-backend does pushing much more efficiently, and is
better maintained).
> I ask because I have 2 projects, one works the other does not.
>
> I am using httpd-2.0.52-49.ent.centos4 and git-1.7.9.6-1.
>
> I am not even sure what to tell more about or where to look next.
If you haven't set up git-http-backend, then git is just going to fetch
the remote repo's data directly over http. So the usual advice for
accessing something via http would apply (check the server's access and
error logs, try hitting it with a web browser, etc).
If you set GIT_CURL_VERBOSE=1 in your environment, git will spew a lot
of debugging information about what http requests it is making. That
might give you a clue (you haven't said anything about what does not
work, so I can't be more specific).
-Peff
^ permalink raw reply
* RE: Version 1.8.1 does not compile on Cygwin 1.7.14
From: Jason Pyeron @ 2013-01-06 3:37 UTC (permalink / raw)
To: git
In-Reply-To: <2491041.bQ51Qu8HcA@thunderbird>
> Stephen & Linda Smith
> Sent: Saturday, January 05, 2013 21:05
>
> Commit 9fca6cffc05321445b59c91e8f8d308f41588b53 message
> states that the macro was being renamed for clarity. The
> patch also changes a define.
Was it the commit before 9fca6cffc05321445b59c91e8f8d308f41588b53 that compiles
or was it 9fca6cffc05321445b59c91e8f8d308f41588b53 that compiled? I am doing a
cygwin update presently to look at it.
>
> This change causes the code to not compile on cygwin 1.7.14.
>
> I narrowed the problem to this patch by bisecting commits
> between v1.8.0 and
> 1.8.1
>
> Here is the error sequence:
>
> CC compat/cygwin.o
> In file included from compat/../git-compat-util.h:90,
> from compat/cygwin.c:9:
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:103:2:
> warning: #warning "fd_set and associated macros have been
> defined in sys/types.
> This may cause runtime problems with W32 sockets"
> In file included from /usr/include/sys/socket.h:16,
> from compat/../git-compat-util.h:131,
> from compat/cygwin.c:9:
> /usr/include/cygwin/socket.h:29: error: redefinition of
> `struct sockaddr'
> /usr/include/cygwin/socket.h:41: error: redefinition of
> `struct sockaddr_storage'
> In file included from /usr/include/sys/socket.h:16,
> from compat/../git-compat-util.h:131,
> from compat/cygwin.c:9:
> /usr/include/cygwin/socket.h:59: error: redefinition of
> `struct linger'
> In file included from compat/../git-compat-util.h:131,
> from compat/cygwin.c:9:
> /usr/include/sys/socket.h:30: error: conflicting types for 'accept'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:536:
> error: previous declaration of 'accept' was here
> /usr/include/sys/socket.h:30: error: conflicting types for 'accept'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:536:
> error: previous declaration of 'accept' was here
> /usr/include/sys/socket.h:32: error: conflicting types for 'bind'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:537:
> error: previous declaration of 'bind' was here
> /usr/include/sys/socket.h:32: error: conflicting types for 'bind'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:537:
> error: previous declaration of 'bind' was here
> /usr/include/sys/socket.h:33: error: conflicting types for 'connect'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:539:
> error: previous declaration of 'connect' was here
> /usr/include/sys/socket.h:33: error: conflicting types for 'connect'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:539:
> error: previous declaration of 'connect' was here
> /usr/include/sys/socket.h:34: error: conflicting types for
> 'getpeername'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:541:
> error: previous declaration of 'getpeername' was here
> /usr/include/sys/socket.h:34: error: conflicting types for
> 'getpeername'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:541:
> error: previous declaration of 'getpeername' was here
> /usr/include/sys/socket.h:35: error: conflicting types for
> 'getsockname'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:542:
> error: previous declaration of 'getsockname' was here
> /usr/include/sys/socket.h:35: error: conflicting types for
> 'getsockname'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:542:
> error: previous declaration of 'getsockname' was here
> /usr/include/sys/socket.h:36: error: conflicting types for 'listen'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:546:
> error: previous declaration of 'listen' was here
> /usr/include/sys/socket.h:36: error: conflicting types for 'listen'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:546:
> error: previous declaration of 'listen' was here
> /usr/include/sys/socket.h:37: error: conflicting types for 'recv'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:547:
> error: previous declaration of 'recv' was here
> /usr/include/sys/socket.h:37: error: conflicting types for 'recv'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:547:
> error: previous declaration of 'recv' was here
> /usr/include/sys/socket.h:39: error: conflicting types for 'recvfrom'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:548:
> error: previous declaration of 'recvfrom' was here
> /usr/include/sys/socket.h:39: error: conflicting types for 'recvfrom'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:548:
> error: previous declaration of 'recvfrom' was here
> /usr/include/sys/socket.h:41: error: conflicting types for 'send'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:549:
> error: previous declaration of 'send' was here
> /usr/include/sys/socket.h:41: error: conflicting types for 'send'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:549:
> error: previous declaration of 'send' was here
> /usr/include/sys/socket.h:44: error: conflicting types for 'sendto'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:550:
> error: previous declaration of 'sendto' was here
> /usr/include/sys/socket.h:44: error: conflicting types for 'sendto'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:550:
> error: previous declaration of 'sendto' was here
> /usr/include/sys/socket.h:46: error: conflicting types for
> 'setsockopt'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:551:
> error: previous declaration of 'setsockopt' was here
> /usr/include/sys/socket.h:46: error: conflicting types for
> 'setsockopt'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:551:
> error: previous declaration of 'setsockopt' was here
> /usr/include/sys/socket.h:48: error: conflicting types for
> 'getsockopt'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:543:
> error: previous declaration of 'getsockopt' was here
> /usr/include/sys/socket.h:48: error: conflicting types for
> 'getsockopt'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:543:
> error: previous declaration of 'getsockopt' was here
> /usr/include/sys/socket.h:49: error: conflicting types for 'shutdown'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:552:
> error: previous declaration of 'shutdown' was here
> /usr/include/sys/socket.h:49: error: conflicting types for 'shutdown'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:552:
> error: previous declaration of 'shutdown' was here
> /usr/include/sys/socket.h:50: error: conflicting types for 'socket'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:553:
> error: previous declaration of 'socket' was here
> /usr/include/sys/socket.h:50: error: conflicting types for 'socket'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:553:
> error: previous declaration of 'socket' was here
> /usr/include/sys/socket.h:53: error: conflicting types for
> 'getservbyname'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:557:
> error: previous declaration of 'getservbyname' was here
> /usr/include/sys/socket.h:53: error: conflicting types for
> 'getservbyname'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:557:
> error: previous declaration of 'getservbyname' was here In
> file included from compat/../git-compat-util.h:135,
> from compat/cygwin.c:9:
> /usr/include/sys/select.h:31: error: conflicting types for 'select'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:632:
> error: previous declaration of 'select' was here
> /usr/include/sys/select.h:31: error: conflicting types for 'select'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:632:
> error: previous declaration of 'select' was here In file
> included from /usr/include/netinet/in.h:14,
> from compat/../git-compat-util.h:137,
> from compat/cygwin.c:9:
> /usr/include/cygwin/in.h:30: error: parse error before
> numeric constant
> /usr/include/cygwin/in.h:35: error: parse error before
> numeric constant
> /usr/include/cygwin/in.h:37: error: parse error before
> numeric constant
> /usr/include/cygwin/in.h:76: error: parse error before
> numeric constant
> /usr/include/cygwin/in.h:115: error: redefinition of `struct in_addr'
> /usr/include/cygwin/in.h:116: error: parse error before '.' token
> /usr/include/cygwin/in.h:184: error: redefinition of `struct
> sockaddr_in'
> In file included from /usr/include/cygwin/in.h:250,
> from /usr/include/netinet/in.h:14,
> from compat/../git-compat-util.h:137,
> from compat/cygwin.c:9:
> /usr/include/asm/byteorder.h:26: error: conflicting types for 'ntohl'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:629:
> error: previous declaration of 'ntohl' was here
> /usr/include/asm/byteorder.h:26: error: conflicting types for 'ntohl'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:629:
> error: previous declaration of 'ntohl' was here
> /usr/include/asm/byteorder.h:27: error: conflicting types for 'ntohs'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:631:
> error: previous declaration of 'ntohs' was here
> /usr/include/asm/byteorder.h:27: error: conflicting types for 'ntohs'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:631:
> error: previous declaration of 'ntohs' was here
> /usr/include/asm/byteorder.h:28: error: conflicting types for 'htonl'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:628:
> error: previous declaration of 'htonl' was here
> /usr/include/asm/byteorder.h:28: error: conflicting types for 'htonl'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:628:
> error: previous declaration of 'htonl' was here
> /usr/include/asm/byteorder.h:29: error: conflicting types for 'htons'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:630:
> error: previous declaration of 'htons' was here
> /usr/include/asm/byteorder.h:29: error: conflicting types for 'htons'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:630:
> error: previous declaration of 'htons' was here In file
> included from compat/../git-compat-util.h:139,
> from compat/cygwin.c:9:
> /usr/include/arpa/inet.h:22: error: conflicting types for 'inet_addr'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:544:
> error: previous declaration of 'inet_addr' was here
> /usr/include/arpa/inet.h:22: error: conflicting types for 'inet_addr'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:544:
> error: previous declaration of 'inet_addr' was here
> /usr/include/arpa/inet.h:28: error: conflicting types for 'inet_ntoa'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:545:
> error: previous declaration of 'inet_ntoa' was here
> /usr/include/arpa/inet.h:28: error: conflicting types for 'inet_ntoa'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:545:
> error: previous declaration of 'inet_ntoa' was here In file
> included from compat/../git-compat-util.h:140,
> from compat/cygwin.c:9:
> /usr/include/netdb.h:79: error: redefinition of `struct hostent'
> /usr/include/netdb.h:93: error: redefinition of `struct netent'
> /usr/include/netdb.h:100: error: redefinition of `struct servent'
> /usr/include/netdb.h:108: error: redefinition of `struct protoent'
> /usr/include/netdb.h:139: error: conflicting types for
> 'WSAGetLastError'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:594:
> error: previous declaration of 'WSAGetLastError' was here
> /usr/include/netdb.h:139: error: conflicting types for
> 'WSAGetLastError'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:594:
> error: previous declaration of 'WSAGetLastError' was here
> /usr/include/netdb.h:192: error: conflicting types for 'gethostbyaddr'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:554:
> error: previous declaration of 'gethostbyaddr' was here
> /usr/include/netdb.h:192: error: conflicting types for 'gethostbyaddr'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:554:
> error: previous declaration of 'gethostbyaddr' was here
> /usr/include/netdb.h:193: error: conflicting types for 'gethostbyname'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:555:
> error: previous declaration of 'gethostbyname' was here
> /usr/include/netdb.h:193: error: conflicting types for 'gethostbyname'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:555:
> error: previous declaration of 'gethostbyname' was here
> /usr/include/netdb.h:199: error: conflicting types for
> 'getprotobyname'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:559:
> error: previous declaration of 'getprotobyname' was here
> /usr/include/netdb.h:199: error: conflicting types for
> 'getprotobyname'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:559:
> error: previous declaration of 'getprotobyname' was here
> /usr/include/netdb.h:200: error: conflicting types for
> 'getprotobynumber'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:558:
> error: previous declaration of 'getprotobynumber' was here
> /usr/include/netdb.h:200: error: conflicting types for
> 'getprotobynumber'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:558:
> error: previous declaration of 'getprotobynumber' was here
> /usr/include/netdb.h:203: error: conflicting types for 'getservbyport'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:556:
> error: previous declaration of 'getservbyport' was here
> /usr/include/netdb.h:203: error: conflicting types for 'getservbyport'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/w
insock2.h:556:
> error: previous declaration of 'getservbyport' was here
> Makefile:2384: recipe for target `compat/cygwin.o' failed
> make: *** [compat/cygwin.o] Error 1
> --
> To unsubscribe from this list: send the line "unsubscribe
> git" in the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- -
- Jason Pyeron PD Inc. http://www.pdinc.us -
- Principal Consultant 10 West 24th Street #100 -
- +1 (443) 269-1555 x333 Baltimore, Maryland 21218 -
- -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.
^ permalink raw reply
* Version 1.8.1 does not compile on Cygwin 1.7.14
From: Stephen & Linda Smith @ 2013-01-06 2:04 UTC (permalink / raw)
To: git; +Cc: mlevedahl, gitster
Commit 9fca6cffc05321445b59c91e8f8d308f41588b53 message states that
the macro was being renamed for clarity. The patch also changes a define.
This change causes the code to not compile on cygwin 1.7.14.
I narrowed the problem to this patch by bisecting commits between v1.8.0 and
1.8.1
Here is the error sequence:
CC compat/cygwin.o
In file included from compat/../git-compat-util.h:90,
from compat/cygwin.c:9:
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:103:2:
warning: #warning "fd_set and associated macros have been defined in sys/types.
This may cause runtime problems with W32 sockets"
In file included from /usr/include/sys/socket.h:16,
from compat/../git-compat-util.h:131,
from compat/cygwin.c:9:
/usr/include/cygwin/socket.h:29: error: redefinition of `struct sockaddr'
/usr/include/cygwin/socket.h:41: error: redefinition of `struct
sockaddr_storage'
In file included from /usr/include/sys/socket.h:16,
from compat/../git-compat-util.h:131,
from compat/cygwin.c:9:
/usr/include/cygwin/socket.h:59: error: redefinition of `struct linger'
In file included from compat/../git-compat-util.h:131,
from compat/cygwin.c:9:
/usr/include/sys/socket.h:30: error: conflicting types for 'accept'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:536:
error: previous declaration of 'accept' was here
/usr/include/sys/socket.h:30: error: conflicting types for 'accept'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:536:
error: previous declaration of 'accept' was here
/usr/include/sys/socket.h:32: error: conflicting types for 'bind'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:537:
error: previous declaration of 'bind' was here
/usr/include/sys/socket.h:32: error: conflicting types for 'bind'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:537:
error: previous declaration of 'bind' was here
/usr/include/sys/socket.h:33: error: conflicting types for 'connect'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:539:
error: previous declaration of 'connect' was here
/usr/include/sys/socket.h:33: error: conflicting types for 'connect'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:539:
error: previous declaration of 'connect' was here
/usr/include/sys/socket.h:34: error: conflicting types for 'getpeername'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:541:
error: previous declaration of 'getpeername' was here
/usr/include/sys/socket.h:34: error: conflicting types for 'getpeername'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:541:
error: previous declaration of 'getpeername' was here
/usr/include/sys/socket.h:35: error: conflicting types for 'getsockname'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:542:
error: previous declaration of 'getsockname' was here
/usr/include/sys/socket.h:35: error: conflicting types for 'getsockname'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:542:
error: previous declaration of 'getsockname' was here
/usr/include/sys/socket.h:36: error: conflicting types for 'listen'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:546:
error: previous declaration of 'listen' was here
/usr/include/sys/socket.h:36: error: conflicting types for 'listen'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:546:
error: previous declaration of 'listen' was here
/usr/include/sys/socket.h:37: error: conflicting types for 'recv'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:547:
error: previous declaration of 'recv' was here
/usr/include/sys/socket.h:37: error: conflicting types for 'recv'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:547:
error: previous declaration of 'recv' was here
/usr/include/sys/socket.h:39: error: conflicting types for 'recvfrom'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:548:
error: previous declaration of 'recvfrom' was here
/usr/include/sys/socket.h:39: error: conflicting types for 'recvfrom'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:548:
error: previous declaration of 'recvfrom' was here
/usr/include/sys/socket.h:41: error: conflicting types for 'send'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:549:
error: previous declaration of 'send' was here
/usr/include/sys/socket.h:41: error: conflicting types for 'send'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:549:
error: previous declaration of 'send' was here
/usr/include/sys/socket.h:44: error: conflicting types for 'sendto'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:550:
error: previous declaration of 'sendto' was here
/usr/include/sys/socket.h:44: error: conflicting types for 'sendto'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:550:
error: previous declaration of 'sendto' was here
/usr/include/sys/socket.h:46: error: conflicting types for 'setsockopt'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:551:
error: previous declaration of 'setsockopt' was here
/usr/include/sys/socket.h:46: error: conflicting types for 'setsockopt'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:551:
error: previous declaration of 'setsockopt' was here
/usr/include/sys/socket.h:48: error: conflicting types for 'getsockopt'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:543:
error: previous declaration of 'getsockopt' was here
/usr/include/sys/socket.h:48: error: conflicting types for 'getsockopt'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:543:
error: previous declaration of 'getsockopt' was here
/usr/include/sys/socket.h:49: error: conflicting types for 'shutdown'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:552:
error: previous declaration of 'shutdown' was here
/usr/include/sys/socket.h:49: error: conflicting types for 'shutdown'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:552:
error: previous declaration of 'shutdown' was here
/usr/include/sys/socket.h:50: error: conflicting types for 'socket'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:553:
error: previous declaration of 'socket' was here
/usr/include/sys/socket.h:50: error: conflicting types for 'socket'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:553:
error: previous declaration of 'socket' was here
/usr/include/sys/socket.h:53: error: conflicting types for 'getservbyname'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:557:
error: previous declaration of 'getservbyname' was here
/usr/include/sys/socket.h:53: error: conflicting types for 'getservbyname'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:557:
error: previous declaration of 'getservbyname' was here
In file included from compat/../git-compat-util.h:135,
from compat/cygwin.c:9:
/usr/include/sys/select.h:31: error: conflicting types for 'select'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:632:
error: previous declaration of 'select' was here
/usr/include/sys/select.h:31: error: conflicting types for 'select'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:632:
error: previous declaration of 'select' was here
In file included from /usr/include/netinet/in.h:14,
from compat/../git-compat-util.h:137,
from compat/cygwin.c:9:
/usr/include/cygwin/in.h:30: error: parse error before numeric constant
/usr/include/cygwin/in.h:35: error: parse error before numeric constant
/usr/include/cygwin/in.h:37: error: parse error before numeric constant
/usr/include/cygwin/in.h:76: error: parse error before numeric constant
/usr/include/cygwin/in.h:115: error: redefinition of `struct in_addr'
/usr/include/cygwin/in.h:116: error: parse error before '.' token
/usr/include/cygwin/in.h:184: error: redefinition of `struct sockaddr_in'
In file included from /usr/include/cygwin/in.h:250,
from /usr/include/netinet/in.h:14,
from compat/../git-compat-util.h:137,
from compat/cygwin.c:9:
/usr/include/asm/byteorder.h:26: error: conflicting types for 'ntohl'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:629:
error: previous declaration of 'ntohl' was here
/usr/include/asm/byteorder.h:26: error: conflicting types for 'ntohl'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:629:
error: previous declaration of 'ntohl' was here
/usr/include/asm/byteorder.h:27: error: conflicting types for 'ntohs'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:631:
error: previous declaration of 'ntohs' was here
/usr/include/asm/byteorder.h:27: error: conflicting types for 'ntohs'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:631:
error: previous declaration of 'ntohs' was here
/usr/include/asm/byteorder.h:28: error: conflicting types for 'htonl'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:628:
error: previous declaration of 'htonl' was here
/usr/include/asm/byteorder.h:28: error: conflicting types for 'htonl'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:628:
error: previous declaration of 'htonl' was here
/usr/include/asm/byteorder.h:29: error: conflicting types for 'htons'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:630:
error: previous declaration of 'htons' was here
/usr/include/asm/byteorder.h:29: error: conflicting types for 'htons'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:630:
error: previous declaration of 'htons' was here
In file included from compat/../git-compat-util.h:139,
from compat/cygwin.c:9:
/usr/include/arpa/inet.h:22: error: conflicting types for 'inet_addr'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:544:
error: previous declaration of 'inet_addr' was here
/usr/include/arpa/inet.h:22: error: conflicting types for 'inet_addr'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:544:
error: previous declaration of 'inet_addr' was here
/usr/include/arpa/inet.h:28: error: conflicting types for 'inet_ntoa'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:545:
error: previous declaration of 'inet_ntoa' was here
/usr/include/arpa/inet.h:28: error: conflicting types for 'inet_ntoa'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:545:
error: previous declaration of 'inet_ntoa' was here
In file included from compat/../git-compat-util.h:140,
from compat/cygwin.c:9:
/usr/include/netdb.h:79: error: redefinition of `struct hostent'
/usr/include/netdb.h:93: error: redefinition of `struct netent'
/usr/include/netdb.h:100: error: redefinition of `struct servent'
/usr/include/netdb.h:108: error: redefinition of `struct protoent'
/usr/include/netdb.h:139: error: conflicting types for 'WSAGetLastError'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:594:
error: previous declaration of 'WSAGetLastError' was here
/usr/include/netdb.h:139: error: conflicting types for 'WSAGetLastError'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:594:
error: previous declaration of 'WSAGetLastError' was here
/usr/include/netdb.h:192: error: conflicting types for 'gethostbyaddr'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:554:
error: previous declaration of 'gethostbyaddr' was here
/usr/include/netdb.h:192: error: conflicting types for 'gethostbyaddr'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:554:
error: previous declaration of 'gethostbyaddr' was here
/usr/include/netdb.h:193: error: conflicting types for 'gethostbyname'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:555:
error: previous declaration of 'gethostbyname' was here
/usr/include/netdb.h:193: error: conflicting types for 'gethostbyname'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:555:
error: previous declaration of 'gethostbyname' was here
/usr/include/netdb.h:199: error: conflicting types for 'getprotobyname'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:559:
error: previous declaration of 'getprotobyname' was here
/usr/include/netdb.h:199: error: conflicting types for 'getprotobyname'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:559:
error: previous declaration of 'getprotobyname' was here
/usr/include/netdb.h:200: error: conflicting types for 'getprotobynumber'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:558:
error: previous declaration of 'getprotobynumber' was here
/usr/include/netdb.h:200: error: conflicting types for 'getprotobynumber'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:558:
error: previous declaration of 'getprotobynumber' was here
/usr/include/netdb.h:203: error: conflicting types for 'getservbyport'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:556:
error: previous declaration of 'getservbyport' was here
/usr/include/netdb.h:203: error: conflicting types for 'getservbyport'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:556:
error: previous declaration of 'getservbyport' was here
Makefile:2384: recipe for target `compat/cygwin.o' failed
make: *** [compat/cygwin.o] Error 1
^ permalink raw reply
* Trying to understand the web dav details
From: Jason Pyeron @ 2013-01-06 1:32 UTC (permalink / raw)
To: 'git'
When doing a clone by https (reverse proxied to http) the first request is
GET /git/project/info/refs?service=git-upload-pack
How does the ?service=xxxx get translated in to the action performed on the web
server?
I ask because I have 2 projects, one works the other does not.
I am using httpd-2.0.52-49.ent.centos4 and git-1.7.9.6-1.
I am not even sure what to tell more about or where to look next.
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- -
- Jason Pyeron PD Inc. http://www.pdinc.us -
- Principal Consultant 10 West 24th Street #100 -
- +1 (443) 269-1555 x333 Baltimore, Maryland 21218 -
- -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.
^ permalink raw reply
* Re: [Feature request] make git buildable from a separate directory
From: Jonathan Nieder @ 2013-01-06 0:49 UTC (permalink / raw)
To: Manlio Perillo; +Cc: git, Eric Blake
In-Reply-To: <50E89275.6080408@gmail.com>
Hi Manlio,
Manlio Perillo wrote:
> Many C projects I have seen (based on autoconf, but not always - like
> Nginx) allow the project to be build in a separate directory, in order
> to avoid to pollute the working directory with compiled files.
>
> Unfortunately this seems to not be possible with Git.
I believe the Cygwin build[1] does this, so that could be a starting
point if you want to work on it.
They use the VPATH variable[2].
Hope that helps,
Jonathan
[1] http://cygwin.com/ml/cygwin/2012-02/msg00391.html
[2] https://www.gnu.org/software/make/manual/html_node/General-Search.html#General-Search
^ permalink raw reply
* Re: [PATCH] run-command: encode signal death as a positive integer
From: Jonathan Nieder @ 2013-01-05 23:58 UTC (permalink / raw)
To: Jeff King; +Cc: Junio C Hamano, Johannes Sixt, git, Bart Trojanowski
In-Reply-To: <20130105231248.GA4140@sigill.intra.peff.net>
Jeff King wrote:
> I'd expecting cooking this patch for a while
> would flush out any I missed.
Heh, probably not. ;-) But I tried to examine all the callsites (and
only found the two messages I mentioned), and among the reviewers, I'm
guessing we hit them all.
Ciao,
Jonathan
^ permalink raw reply
* Re: [PATCH] fix compilation with NO_PTHREADS
From: Jonathan Nieder @ 2013-01-05 23:40 UTC (permalink / raw)
To: Jeff King; +Cc: Junio C Hamano, git
In-Reply-To: <20130105145229.GA25112@sigill.intra.peff.net>
Jeff King wrote:
> I happened to notice this while looking at the sigpipe topic. I guess
> not many people are building with NO_PTHREADS these days.
Or that those people don't build "next". :)
Thanks for catching it.
^ permalink raw reply
* Re: [PATCH] archive-tar: split long paths more carefully
From: Jonathan Nieder @ 2013-01-05 23:31 UTC (permalink / raw)
To: René Scharfe; +Cc: Junio C Hamano, git
In-Reply-To: <50E8AE12.8040102@lsrfire.ath.cx>
René Scharfe wrote:
> --- a/archive-tar.c
> +++ b/archive-tar.c
> @@ -153,6 +153,8 @@ static unsigned int ustar_header_chksum(const struct ustar_header *header)
> static size_t get_path_prefix(const char *path, size_t pathlen, size_t maxlen)
> {
> size_t i = pathlen;
> + if (i > 1 && path[i - 1] == '/')
> + i--;
Beautiful.
^ permalink raw reply
* Re: [PATCH] Documentation: fix man page dependency on asciidoc.conf
From: Jonathan Nieder @ 2013-01-05 23:28 UTC (permalink / raw)
To: John Keeping; +Cc: git, Junio C Hamano, Sergey Vlasov
In-Reply-To: <20130105160017.GD6440@serenity.lan>
John Keeping wrote:
> When building manual pages, the source text is transformed to XML with
> AsciiDoc before the man pages are generated from the XML with xmlto.
>
> Fix the dependency in the Makefile so that the XML files are rebuilt
> when asciidoc.conf changes and not just the manual pages from unchanged
> XML.
Good catch, thanks.
Would something like the following make sense, to make it more obvious
how the dependency needs to be adjusted if we change the $(ASCIIDOC)
command line for some reason?
diff --git i/Documentation/Makefile w/Documentation/Makefile
index e53d333e..971977b8 100644
--- i/Documentation/Makefile
+++ w/Documentation/Makefile
@@ -178,8 +178,6 @@ all: html man
html: $(DOC_HTML)
-$(DOC_HTML) $(DOC_MAN1) $(DOC_MAN5) $(DOC_MAN7): asciidoc.conf
-
man: man1 man5 man7
man1: $(DOC_MAN1)
man5: $(DOC_MAN5)
@@ -257,7 +255,7 @@ clean:
$(RM) $(cmds_txt) *.made
$(RM) manpage-base-url.xsl
-$(MAN_HTML): %.html : %.txt
+$(MAN_HTML): %.html : %.txt asciidoc.conf
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
$(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf \
$(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) -o $@+ $< && \
@@ -270,7 +268,7 @@ manpage-base-url.xsl: manpage-base-url.xsl.in
$(QUIET_XMLTO)$(RM) $@ && \
$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
-%.xml : %.txt
+%.xml : %.txt asciidoc.conf
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
$(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf \
$(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) -o $@+ $< && \
@@ -286,7 +284,7 @@ technical/api-index.txt: technical/api-index-skel.txt \
$(QUIET_GEN)cd technical && '$(SHELL_PATH_SQ)' ./api-index.sh
technical/%.html: ASCIIDOC_EXTRA += -a git-relative-html-prefix=../
-$(patsubst %,%.html,$(API_DOCS) technical/api-index $(TECH_DOCS)): %.html : %.txt
+$(patsubst %,%.html,$(API_DOCS) technical/api-index $(TECH_DOCS)): %.html : %.txt asciidoc.conf
$(QUIET_ASCIIDOC)$(ASCIIDOC) -b xhtml11 -f asciidoc.conf \
$(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) $*.txt
diff --git i/t/test-terminal.perl w/t/test-terminal.perl
index 10172aee..1fb373f2 100755
--- i/t/test-terminal.perl
+++ w/t/test-terminal.perl
@@ -31,7 +31,7 @@ sub finish_child {
} elsif ($? & 127) {
my $code = $? & 127;
warn "died of signal $code";
- return $code - 128;
+ return $code + 128;
} else {
return $? >> 8;
}
^ permalink raw reply related
* Re: [PATCH] git-fast-import(1): remove duplicate "--done" option
From: Jonathan Nieder @ 2013-01-05 23:12 UTC (permalink / raw)
To: John Keeping; +Cc: git, Eric S. Raymond, Sverre Rabbelier
In-Reply-To: <20130105160652.GE6440@serenity.lan>
John Keeping wrote:
> The "--done" option to git-fast-import is documented twice in its manual
> page. Combine the best bits of each description, keeping the location
> of the instance that was added first.
>
> Signed-off-by: John Keeping <john@keeping.me.uk>
Good catch, thanks.
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
^ permalink raw reply
* Re: [PATCH] run-command: encode signal death as a positive integer
From: Jeff King @ 2013-01-05 23:12 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: Junio C Hamano, Johannes Sixt, git, Bart Trojanowski
In-Reply-To: <20130105221909.GA3247@elie.Belkin>
On Sat, Jan 05, 2013 at 02:19:09PM -0800, Jonathan Nieder wrote:
> > Documentation/technical/api-run-command.txt | 6 ++----
> > editor.c | 2 +-
> > run-command.c | 2 +-
> > 3 files changed, 4 insertions(+), 6 deletions(-)
>
> t/test-terminal.perl imitates the same logic. It doesn't check for
> anything other than whether the exit status is 0, but maybe it would
> be worth squashing in the below as a futureproofing measure
> nonetheless.
Yeah, I think so. As you say, it does not matter, but it makes sense to
keep our conventions consistent.
> Aside from the launch_editor bugfix, the only observable effects of
> the above patch I can find are some changed error messages:
>
> error: external filter cat failed -126
> -> error: external filter cat failed 130
>
> warning: svnrdump, returned -126
> -> warning: svnrdump, returned 130
>
> Those messages are equally senseless before and after the patch, so
> for what it's worth,
Thanks. I agree that change isn't a big deal (I would argue the positive
return is slightly more coherent as it matches what the shell would
report, but I really think user-facing errors should probably not even
mention the exact exit code, as it is just noise most of the time, and
we already complain about signals in wait_or_whine).
I did try auditing the callers of finish_command (and run_command) to
make sure I wasn't regressing anybody, but there are a lot of call
sites. In some cases we immediately say:
if (finish_command(&child))
die("failed...");
which is obviously unaffected. But in many cases we pass the exit code
up through several levels. It usually just ends up in exit() or being
collapsed to an error boolean, which is fine, but I may have missed a
spot where it matters. I'd expecting cooking this patch for a while
would flush out any I missed.
> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Thanks (and to J6t) for the review.
-Peff
^ permalink raw reply
* Re: [PATCH] Alphabetize the fast-import options, following a suggestion on the list.
From: Jonathan Nieder @ 2013-01-05 23:11 UTC (permalink / raw)
To: Eric S. Raymond; +Cc: git, David Michael Barr, Pete Wyckoff
In-Reply-To: <20130105164415.39B144044B@snark.thyrsus.com>
Eric S. Raymond wrote:
> ---
Missing sign-off. Depending on when you prefer to add the sign-off, something
like
echo '[alias] c = commit --signoff' >>~/.gitconfig
or
echo '[alias] f = format-patch --signoff' >>~/.gitconfig
might be useful for the future, assuming you already look over what
you are sending out in a mail client to avoid mistakes.
> Documentation/git-fast-import.txt | 94 +++++++++++++++++++--------------------
> 1 file changed, 45 insertions(+), 49 deletions(-)
My knee-jerk response was "If the options are currently organized logically,
wouldn't it be more appropriate to add a sub-heading for each group of options
and alphabetize only within the subgroups?"
But in fact the current options list doesn't seem to be well organized at all.
What do you think would be a logical way to group these?
Features of input syntax
--date-format
--done
Verbosity
--quiet
--stats
Marks handling (checkpoint/restore)
--import-marks
--import-marks-if-exists
--export-marks
--relative-marks
Semantics of execution
--dry-run
--force
--cat-blob-fd
--export-pack-edges
Tuning
--active-branches
--max-pack-size
--big-file-threshold
--depth
^ permalink raw reply
* Re: [PATCH] status: report ignored yet tracked directories
From: Jeff King @ 2013-01-05 23:03 UTC (permalink / raw)
To: Antoine Pelisse; +Cc: tboegi, git
In-Reply-To: <1357418563-6626-1-git-send-email-apelisse@gmail.com>
On Sat, Jan 05, 2013 at 09:42:43PM +0100, Antoine Pelisse wrote:
> Tracked directories (i.e. directories containing tracked files) that
> are ignored must be reported as ignored if they contain untracked files.
>
> Currently, tracked files or directories can't be reported untracked or ignored.
> Remove that constraint when searching ignored files.
>
> Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
> ---
I was expecting to see some explanation of the user-visible bug here. In
other words, what does this fix, and why does the bug only happen when
core.ignorecase is set.
Looking at your fix and remembering how the index hashing works, I think
the answer is that:
1. This bug only affects directories, because they are the only thing
that can be simultaneously "ignored and untracked" and "tracked"
(i.e., they have entries of both, and we are using
DIR_SHOW_OTHER_DIRECTORIES).
2. When core.ignorecase is false, the index name hash contains only
the file entries, and cache_name_exists returns an exact match. So
it doesn't matter if we make an extra check when adding the
directory via dir_add_name; we know that it will not be there, and
the final check is a no-op.
3. When core.ignorecase is true, we also store directory entries in
the index name hash, and this extra check is harmful; the entry
does not really exist in the index, and we still need to add it.
But that makes me wonder. In the ignorecase=false case, I claimed that
the check in dir_add_name is a no-op for mixed tracked/ignored
directories. But it is presumably not a no-op for other cases. Your
patch only turns it off when DIR_SHOW_IGNORED is set. But is it possible
for us to have DIR_SHOW_IGNORED set, _and_ to pass in a path that exists
in the index as a regular file?
I think in the normal file case, we'd expect treat_path to just tell us
that it is handled, and we would not ever call dir_add_name in the first
place. But what if we have an index entry for a file, but the working
tree now contains a directory?
I _think_ we still do not hit this code path in that instance, because
we will end up in treat_directory, and we will end up checking
directory_exists_in_index. And I cannot get it to misbehave in practice.
So I think your fix is correct, but the exact how and why is a bit
subtle.
-Peff
^ permalink raw reply
* Re: cvsps, parsecvs, svn2git and the CVS exporter mess
From: Jonathan Nieder @ 2013-01-05 22:57 UTC (permalink / raw)
To: Eric S. Raymond
Cc: Max Horn, Michael Haggerty, Yann Dirson, Heiko Voigt,
Antoine Pelisse, Bart Massey, Keith Packard, David Mansfield, git
In-Reply-To: <20130105151106.GA1938@thyrsus.com>
Eric S. Raymond wrote:
> Michael Haggerty wants me to trust that cvs2git's analysis stage has
> been fixed, but I must say that is a more difficult leap of faith when
> two of the most visible things about it are still (a) a conspicuous
> instance of interface misdesign, and (b) documentation that is careless and
> incomplete.
For what it's worth, I use cvs2git quite often. I've found it to work
well and its code to be clear and its developers responsive. But I
don't mind if we disagree, and multiple implementations to explore the
design space of importers doesn't seem like a terrible outcome.
Thanks for your work,
Jonathan
^ permalink raw reply
* Re: [PATCH] Add getenv.so for catching invalid getenv() use via LD_PRELOAD
From: Jonathan Nieder @ 2013-01-05 22:53 UTC (permalink / raw)
To: Nguyễn Thái Ngọc Duy; +Cc: git, Junio C Hamano, David Michael
In-Reply-To: <1357376146-7155-1-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy wrote:
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
> Perhaps this will help the getenv bug hunting
Even if no one decides to do the getenv hunting (I haven't decided yet
whether it's worth the trouble, though patches like the setup_path()
one that make string lifetimes clearer are valuable anyway), this
looks useful as a debugging tool when people on strange platforms
report problems. And unlike the trick I sent a while ago, it doesn't
involve recompiling git. So for what it's worth,
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Thanks.
^ permalink raw reply
* Re: [LHF] making t5000 "tar xf" tests more lenient
From: René Scharfe @ 2013-01-05 22:50 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vsj6fpeys.fsf@alter.siamese.dyndns.org>
Am 05.01.2013 21:11, schrieb Junio C Hamano:
> René Scharfe <rene.scharfe@lsrfire.ath.cx> writes:
>
>> Anyway, I don't think the pax headers are to blame here.
>
> Hmph, I am reasonably sure I saw a test that created an archive from
> a commit (hence with pax header), asked platform tar to either list
> the contents or actually extracted to the filesystem, and tried to
> ensure nothing but the paths in the repository existed in the
> archive. When the platform tar implementation treated the pax
> header as an extra file, such a test sees something not in the
> repository and fails.
t5000 avoids that issue by comparing only the contents of a
subdirectory. The script could do with a little cleanup, in any case.
Moving ZIP testing into its own file, more explicit pax header file
handling, speaking file and directory names, and modern coding style
would all be nice. :)
René
^ permalink raw reply
* [PATCH] archive-tar: split long paths more carefully
From: René Scharfe @ 2013-01-05 22:49 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vwqw7mb09.fsf@alter.siamese.dyndns.org>
The name field of a tar header has a size of 100 characters. This limit
was extended long ago in a backward compatible way by providing the
additional prefix field, which can hold 155 additional characters. The
actual path is constructed at extraction time by concatenating the prefix
field, a slash and the name field.
get_path_prefix() is used to determine which slash in the path is used as
the cutting point and thus which part of it is placed into the field
prefix and which into the field name. It tries to cram as much into the
prefix field as possible. (And only if we can't fit a path into the
provided 255 characters we use a pax extended header to store it.)
If a path is longer than 100 but shorter than 156 characters and ends
with a slash (i.e. is for a directory) then get_path_prefix() puts the
whole path in the prefix field and leaves the name field empty. GNU tar
reconstructs the path without complaint, but the tar included with
NetBSD 6 does not: It reports the header to be invalid.
For compatibility with this version of tar, make sure to never leave the
name field empty. In order to do that, trim the trailing slash from the
part considered as possible prefix, if it exists -- that way the last
path component (or more, but not less) will end up in the name field.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
---
archive-tar.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/archive-tar.c b/archive-tar.c
index 0ba3f25..923daf5 100644
--- a/archive-tar.c
+++ b/archive-tar.c
@@ -153,6 +153,8 @@ static unsigned int ustar_header_chksum(const struct ustar_header *header)
static size_t get_path_prefix(const char *path, size_t pathlen, size_t maxlen)
{
size_t i = pathlen;
+ if (i > 1 && path[i - 1] == '/')
+ i--;
if (i > maxlen)
i = maxlen;
do {
--
1.7.12
^ permalink raw reply related
* Re: [PATCH 01/10] list_lookup: create case and length search
From: Junio C Hamano @ 2013-01-05 22:39 UTC (permalink / raw)
To: Antoine Pelisse; +Cc: git
In-Reply-To: <1357421206-5014-2-git-send-email-apelisse@gmail.com>
Antoine Pelisse <apelisse@gmail.com> writes:
> Create a new function to look-up a string in a string_list, but:
> - add a new parameter to ignore case differences
> - add a length parameter to search for a substring
>
> The idea is to avoid several copies (lowering a string before searching
> it when we just want to ignore case), or copying a substring of a bigger
> string to search it in the string_list
>
> Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
> ---
I did not read beyond the log message and the function signature of
the updated get_entry_index(), but it strikes me insane to build a
sorted list using case sensitive full string comarison and then to
look for an element in that list using a different comparison
criteria (e.g. case insensitive comparison) and to expect the
bisection search to still work. Shouldn't the codepath that builds
the string-list be sorting the list in case insensitive way from the
beginning if this were to work correctly?
It seems to suggest to me that this "are the keys case sensitive?"
bit belongs to the entire struct string_list structure as its
property (similar to the way "do the keys need to be strdup'ed?"
bit), not something you would flip per invocation basis of the
lookup function.
Also isn't size_t an unsigned type? What does it even mean to pass
"-1" to it, and propagate it down to strncmp()?
If you have a list sorted by a key, and if you want to query it with
a partial prefix of a possibly valid key, I think you shouldn't have
to add the "length search" at all. The existing look up function
would return the location in the list that short key would have been
inserted, which would come before the first entry that your short
key is a prefix of, so the caller can iterate the list from there to
find all entries. In other words, if existing list has "aaa",
"bba", and "bbc", and you want to grab entries that begin with "bb",
you can ask for "bb" to the loop up function, which would say "the
key does not exist in the list, but it would be inserted before this
'bba' entry". Then you can discover that "bba" and "bbc" both
matches the shortened key you have, no?
^ permalink raw reply
* Re: [PATCH] run-command: encode signal death as a positive integer
From: Jonathan Nieder @ 2013-01-05 22:19 UTC (permalink / raw)
To: Jeff King; +Cc: Junio C Hamano, Johannes Sixt, git, Bart Trojanowski
In-Reply-To: <20130105144949.GA24479@sigill.intra.peff.net>
Hi,
Jeff King wrote:
> When a sub-command dies due to a signal, we encode the
> signal number into the numeric exit status as "signal -
> 128".
[...]
> So we have a negative value inside the code, but once it
> passes across an exit() barrier, it looks positive (and any
> code we receive from a sub-shell will have the positive
> form).
[...]
> Unfortunately, this means that when the "use_shell" option
> is set, we need to be on the lookout for _both_ forms.
[...]
> for the callers that do care, we can make life
> slightly easier by just using the consistent positive form.
Makes perfect sense.
> Documentation/technical/api-run-command.txt | 6 ++----
> editor.c | 2 +-
> run-command.c | 2 +-
> 3 files changed, 4 insertions(+), 6 deletions(-)
t/test-terminal.perl imitates the same logic. It doesn't check for
anything other than whether the exit status is 0, but maybe it would
be worth squashing in the below as a futureproofing measure
nonetheless.
Aside from the launch_editor bugfix, the only observable effects of
the above patch I can find are some changed error messages:
error: external filter cat failed -126
-> error: external filter cat failed 130
warning: svnrdump, returned -126
-> warning: svnrdump, returned 130
Those messages are equally senseless before and after the patch, so
for what it's worth,
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Thanks.
diff --git i/t/test-terminal.perl w/t/test-terminal.perl
index 10172aee..1fb373f2 100755
--- i/t/test-terminal.perl
+++ w/t/test-terminal.perl
@@ -31,7 +31,7 @@ sub finish_child {
} elsif ($? & 127) {
my $code = $? & 127;
warn "died of signal $code";
- return $code - 128;
+ return $code + 128;
} else {
return $? >> 8;
}
^ permalink raw reply related
* [PATCH 07/10] log: add --use-mailmap option
From: Antoine Pelisse @ 2013-01-05 21:26 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Antoine Pelisse, git
In-Reply-To: <1357421206-5014-1-git-send-email-apelisse@gmail.com>
Add the --use-mailmap option to log commands. It allows
to display names from mailmap file when displaying logs,
whatever the format used.
Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
---
Documentation/git-log.txt | 5 +++++
builtin/log.c | 9 ++++++++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt
index 585dac4..a99be97 100644
--- a/Documentation/git-log.txt
+++ b/Documentation/git-log.txt
@@ -47,6 +47,11 @@ OPTIONS
Print out the ref name given on the command line by which each
commit was reached.
+--use-mailmap::
+ Use mailmap file to map author and committer names and email
+ to canonical real names and email addresses. See
+ linkgit:git-shortlog[1].
+
--full-diff::
Without this flag, "git log -p <path>..." shows commits that
touch the specified paths, and diffs about the same specified
diff --git a/builtin/log.c b/builtin/log.c
index e7b7db1..d2bd8ce 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -22,6 +22,7 @@
#include "branch.h"
#include "streaming.h"
#include "version.h"
+#include "mailmap.h"
/* Set a default date-time format for git log ("log.date" config variable) */
static const char *default_date_mode = NULL;
@@ -94,11 +95,12 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,
struct rev_info *rev, struct setup_revision_opt *opt)
{
struct userformat_want w;
- int quiet = 0, source = 0;
+ int quiet = 0, source = 0, mailmap = 0;
const struct option builtin_log_options[] = {
OPT_BOOLEAN(0, "quiet", &quiet, N_("suppress diff output")),
OPT_BOOLEAN(0, "source", &source, N_("show source")),
+ OPT_BOOLEAN(0, "use-mailmap", &mailmap, N_("Use mail map file")),
{ OPTION_CALLBACK, 0, "decorate", NULL, NULL, N_("decorate options"),
PARSE_OPT_OPTARG, decorate_callback},
OPT_END()
@@ -136,6 +138,11 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,
if (source)
rev->show_source = 1;
+ if (mailmap) {
+ rev->mailmap = xcalloc(1, sizeof(struct string_list));
+ read_mailmap(rev->mailmap, NULL);
+ }
+
if (rev->pretty_given && rev->commit_format == CMIT_FMT_RAW) {
/*
* "log --pretty=raw" is special; ignore UI oriented
--
1.7.12.4.3.g2036a08.dirty
^ permalink raw reply related
* Re: [PATCH] status: report ignored yet tracked directories
From: Torsten Bögershausen @ 2013-01-05 21:27 UTC (permalink / raw)
To: Antoine Pelisse; +Cc: tboegi, peff, git
In-Reply-To: <1357418563-6626-1-git-send-email-apelisse@gmail.com>
On 05.01.13 21:42, Antoine Pelisse wrote:
> Tracked directories (i.e. directories containing tracked files) that
> are ignored must be reported as ignored if they contain untracked files.
>
> Currently, tracked files or directories can't be reported untracked or ignored.
> Remove that constraint when searching ignored files.
>
> Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
> ---
> Torsten, Jeff,
>
> Can you please test this patch and tell me if this is better ? (t7061 is now
> successful with core.ignorecase=true)
>
> This patch applies on top of ap/status-ignored-in-ignored-directory (but
> should also apply cleanly on top of next for testing purpose).
>
> Thanks,
>
> dir.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/dir.c b/dir.c
> index 9b80348..eefa8ab 100644
> --- a/dir.c
> +++ b/dir.c
> @@ -672,7 +672,8 @@ static struct dir_entry *dir_entry_new(const char *pathname, int len)
>
> static struct dir_entry *dir_add_name(struct dir_struct *dir, const char *pathname, int len)
> {
> - if (cache_name_exists(pathname, len, ignore_case))
> + if (!(dir->flags & DIR_SHOW_IGNORED) &&
> + cache_name_exists(pathname, len, ignore_case))
> return NULL;
>
> ALLOC_GROW(dir->entries, dir->nr+1, dir->alloc);
> --
> 1.7.12.4.2.geb8c5b8.dirty
>
(BTW: thanks for contributing to git)
Antoine, the test is OK:
# passed all 10 test(s)
================
I'm not sure if I am happy with the commit message, so I try to have an improved
version below, which may be a starting point for a discussion:
git status: report ignored directories correctly
A directory containing tracked files where the directory
is ignored must be reported as ignored even if it contains untracked files.
/Torsten
^ permalink raw reply
* Re: [PATCH v4] git-completion.bash: add support for path completion
From: Manlio Perillo @ 2013-01-05 21:27 UTC (permalink / raw)
To: Marc Khouzam
Cc: Junio C Hamano, git@vger.kernel.org, szeder@ira.uka.de,
felipe.contreras@gmail.com
In-Reply-To: <E59706EF8DB1D147B15BECA3322E4BDC0681FA@eusaamb103.ericsson.se>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Il 05/01/2013 21:23, Marc Khouzam ha scritto:
> [...]
> I did further testing with your patch and found some less obvious
> issues. I didn't debug the script myself as I'm not that familiar with
> it either, but I think the testcases below should help Manlio or
> someone else look into some regressions.
>
> 1- Using .. or . breaks completion when after the '/':
> [...]
> 2- Maybe related to problem 1. Using .. breaks completion in other ways:
> [...]
> 3- Also probably related to problems 1 and 2. Using absolute paths behaves wierdly and
> worse than before:
Thanks for this.
I begin to suspect that this is the reason why path completion has not
been implemented by the original author of the bash completion script.
These issues seems hard to fix.
Tomorrow I will take some time to try to fix all the reported issues.
> [...]
Regards Manlio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAlDomskACgkQscQJ24LbaUQJdwCfX0bMq3V88soqtf+xlypZ5D4f
qwAAn3bK7UlcOK+hm+u06jmT05l1aJVf
=IWap
-----END PGP SIGNATURE-----
^ permalink raw reply
* [PATCH 09/10] log: grep author/committer using mailmap
From: Antoine Pelisse @ 2013-01-05 21:26 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Antoine Pelisse, git
In-Reply-To: <1357421206-5014-1-git-send-email-apelisse@gmail.com>
Currently you can use mailmap to display log authors and committers
but you can't use the mailmap to find commits with mapped values.
This commit allows you to run:
git log --use-mailmap --author mapped_name_or_email
git log --use-mailmap --committer mapped_name_or_email
Of course it only works if the --use-mailmap option is used.
The new name and email are copied only when necessary.
Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
---
revision.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
t/t4203-mailmap.sh | 18 ++++++++++++++++++
2 files changed, 72 insertions(+)
diff --git a/revision.c b/revision.c
index 95d21e6..2cce85a 100644
--- a/revision.c
+++ b/revision.c
@@ -13,6 +13,7 @@
#include "decorate.h"
#include "log-tree.h"
#include "string-list.h"
+#include "mailmap.h"
volatile show_early_output_fn_t show_early_output;
@@ -2219,6 +2220,51 @@ static int rewrite_parents(struct rev_info *revs, struct commit *commit)
return 0;
}
+static int commit_rewrite_person(struct strbuf *buf, const char *what, struct string_list *mailmap)
+{
+ char *person, *endp;
+ size_t len, namelen, maillen;
+ const char *name;
+ const char *mail;
+ struct ident_split ident;
+
+ person = strstr(buf->buf, what);
+ if (!person)
+ return 0;
+
+ person += strlen(what);
+ endp = strchr(person, '\n');
+ if (!endp)
+ return 0;
+
+ len = endp - person;
+
+ if (split_ident_line(&ident, person, len))
+ return 0;
+
+ mail = ident.mail_begin;
+ maillen = ident.mail_end - ident.mail_begin;
+ name = ident.name_begin;
+ namelen = ident.name_end - ident.name_begin;
+
+ if (map_user(mailmap, &mail, &maillen, &name, &namelen)) {
+ struct strbuf namemail = STRBUF_INIT;
+
+ strbuf_addf(&namemail, "%.*s <%.*s>",
+ (int)namelen, name, (int)maillen, mail);
+
+ strbuf_splice(buf, ident.name_begin - buf->buf,
+ ident.mail_end - ident.name_begin + 1,
+ namemail.buf, namemail.len);
+
+ strbuf_release(&namemail);
+
+ return 1;
+ }
+
+ return 0;
+}
+
static int commit_match(struct commit *commit, struct rev_info *opt)
{
int retval;
@@ -2237,6 +2283,14 @@ static int commit_match(struct commit *commit, struct rev_info *opt)
if (buf.len)
strbuf_addstr(&buf, commit->buffer);
+ if (opt->mailmap) {
+ if (!buf.len)
+ strbuf_addstr(&buf, commit->buffer);
+
+ commit_rewrite_person(&buf, "\nauthor ", opt->mailmap);
+ commit_rewrite_person(&buf, "\ncommitter ", opt->mailmap);
+ }
+
/* Append "fake" message parts as needed */
if (opt->show_notes) {
if (!buf.len)
diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh
index db043dc..e16187f 100755
--- a/t/t4203-mailmap.sh
+++ b/t/t4203-mailmap.sh
@@ -248,11 +248,29 @@ Author: Other Author <other@author.xx>
Author: Some Dude <some@dude.xx>
Author: A U Thor <author@example.com>
EOF
+
test_expect_success 'Log output with --use-mailmap' '
git log --use-mailmap | grep Author >actual &&
test_cmp expect actual
'
+cat >expect <<\EOF
+Author: Santa Claus <santa.claus@northpole.xx>
+Author: Santa Claus <santa.claus@northpole.xx>
+EOF
+
+test_expect_success 'Grep author with --use-mailmap' '
+ git log --use-mailmap --author Santa | grep Author >actual &&
+ test_cmp expect actual
+'
+
+>expect
+
+test_expect_success 'Only grep replaced author with --use-mailmap' '
+ git log --use-mailmap --author "<cto@coompany.xx>" >actual &&
+ test_cmp expect actual
+'
+
# git blame
cat >expect <<\EOF
^OBJI (A U Thor DATE 1) one
--
1.7.12.4.3.g2036a08.dirty
^ permalink raw reply related
* [PATCH 10/10] log: add log.mailmap configuration option
From: Antoine Pelisse @ 2013-01-05 21:26 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Antoine Pelisse, git
In-Reply-To: <1357421206-5014-1-git-send-email-apelisse@gmail.com>
Teach "log.mailmap" configuration variable to turn "--use-mailmap"
option on to "git log", "git show" and "git whatchanged".
The "--no-use-mailmap" option from the command line can countermand
the setting.
Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
---
Documentation/config.txt | 4 ++++
builtin/log.c | 7 +++++++
t/t4203-mailmap.sh | 24 ++++++++++++++++++++++++
3 files changed, 35 insertions(+)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index bf8f911..226362a 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -1509,6 +1509,10 @@ log.showroot::
Tools like linkgit:git-log[1] or linkgit:git-whatchanged[1], which
normally hide the root commit will now show it. True by default.
+log.mailmap::
+ If true, makes linkgit:git-log[1], linkgit:git-show[1], and
+ linkgit:git-whatchanged[1] assume `--use-mailmap`.
+
mailmap.file::
The location of an augmenting mailmap file. The default
mailmap, located in the root of the repository, is loaded
diff --git a/builtin/log.c b/builtin/log.c
index d2bd8ce..16e6520 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -31,6 +31,7 @@ static int default_abbrev_commit;
static int default_show_root = 1;
static int decoration_style;
static int decoration_given;
+static int use_mailmap_config;
static const char *fmt_patch_subject_prefix = "PATCH";
static const char *fmt_pretty;
@@ -106,6 +107,7 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,
OPT_END()
};
+ mailmap = use_mailmap_config;
argc = parse_options(argc, argv, prefix,
builtin_log_options, builtin_log_usage,
PARSE_OPT_KEEP_ARGV0 | PARSE_OPT_KEEP_UNKNOWN |
@@ -358,6 +360,11 @@ static int git_log_config(const char *var, const char *value, void *cb)
}
if (!prefixcmp(var, "color.decorate."))
return parse_decorate_color_config(var, 15, value);
+ if (!strcmp(var, "log.mailmap")) {
+ use_mailmap_config = git_config_bool(var, value);
+ return 0;
+ }
+
if (grep_config(var, value, cb) < 0)
return -1;
return git_diff_ui_config(var, value, cb);
diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh
index e16187f..7d4d31c 100755
--- a/t/t4203-mailmap.sh
+++ b/t/t4203-mailmap.sh
@@ -255,6 +255,21 @@ test_expect_success 'Log output with --use-mailmap' '
'
cat >expect <<\EOF
+Author: CTO <cto@company.xx>
+Author: Santa Claus <santa.claus@northpole.xx>
+Author: Santa Claus <santa.claus@northpole.xx>
+Author: Other Author <other@author.xx>
+Author: Other Author <other@author.xx>
+Author: Some Dude <some@dude.xx>
+Author: A U Thor <author@example.com>
+EOF
+
+test_expect_success 'Log output with log.mailmap' '
+ git -c log.mailmap=True log | grep Author >actual &&
+ test_cmp expect actual
+'
+
+cat >expect <<\EOF
Author: Santa Claus <santa.claus@northpole.xx>
Author: Santa Claus <santa.claus@northpole.xx>
EOF
@@ -263,6 +278,15 @@ test_expect_success 'Grep author with --use-mailmap' '
git log --use-mailmap --author Santa | grep Author >actual &&
test_cmp expect actual
'
+cat >expect <<\EOF
+Author: Santa Claus <santa.claus@northpole.xx>
+Author: Santa Claus <santa.claus@northpole.xx>
+EOF
+
+test_expect_success 'Grep author with log.mailmap' '
+ git -c log.mailmap=True log --author Santa | grep Author >actual &&
+ test_cmp expect actual
+'
>expect
--
1.7.12.4.3.g2036a08.dirty
^ permalink raw reply related
* [PATCH 08/10] test: add test for --use-mailmap option
From: Antoine Pelisse @ 2013-01-05 21:26 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Antoine Pelisse, git
In-Reply-To: <1357421206-5014-1-git-send-email-apelisse@gmail.com>
The new option '--use-mailmap' can be used to make
sure that mailmap file is used to convert name
when running log commands.
The test is simple and checks that the Author line
is correctly replaced when running log.
Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
---
t/t4203-mailmap.sh | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh
index 1f182f6..db043dc 100755
--- a/t/t4203-mailmap.sh
+++ b/t/t4203-mailmap.sh
@@ -239,6 +239,20 @@ test_expect_success 'Log output (complex mapping)' '
test_cmp expect actual
'
+cat >expect <<\EOF
+Author: CTO <cto@company.xx>
+Author: Santa Claus <santa.claus@northpole.xx>
+Author: Santa Claus <santa.claus@northpole.xx>
+Author: Other Author <other@author.xx>
+Author: Other Author <other@author.xx>
+Author: Some Dude <some@dude.xx>
+Author: A U Thor <author@example.com>
+EOF
+test_expect_success 'Log output with --use-mailmap' '
+ git log --use-mailmap | grep Author >actual &&
+ test_cmp expect actual
+'
+
# git blame
cat >expect <<\EOF
^OBJI (A U Thor DATE 1) one
--
1.7.12.4.3.g2036a08.dirty
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox