Commit graph

1762 commits

Author SHA1 Message Date
Junio C Hamano 8cabd200d2 Merge branch 'mk/qnx'
Port to QNX.

* mk/qnx:
  Port to QNX
  Make lock local to fetch_pack
2013-01-03 10:28:33 -08:00
Junio C Hamano 324dfac8c9 Merge branch 'dm/port'
Add a few more knobs for new platform ports can tweak.

* dm/port:
  git-compat-util.h: do not #include <sys/param.h> by default
  Generalize the inclusion of strings.h
  Detect when the passwd struct is missing pw_gecos
  Support builds when sys/param.h is missing
2013-01-03 10:28:21 -08:00
Matt Kraai 40036bedb9 Port to QNX
Signed-off-by: Matt Kraai <matt.kraai@amo.abbott.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-19 19:00:00 -08:00
Junio C Hamano b2d05e0653 git-compat-util.h: do not #include <sys/param.h> by default
Earlier we allowed platforms that lack <sys/param.h> not to include
the header file from git-compat-util.h; we have included this header
file since the early days back when we used MAXPATHLEN (which we no
longer use) and also depended on it slurping ULONG_MAX (which we get
by including stdint.h or inttypes.h these days).

It turns out that we can compile our modern codebase just file
without including it on many platforms (so far, Fedora, Debian,
Ubuntu, MinGW, Mac OS X, Cygwin, HP-Nonstop, QNX and z/OS are
reported to be OK).

Let's stop including it by default, and on platforms that need it to
be included, leave "make NEEDS_SYS_PARAM_H=YesPlease" as an escape
hatch and ask them to report to us, so that we can find out about
the real dependency and fix it in a more platform agnostic way.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-19 18:57:46 -08:00
David Michael b3e103dabe Generalize the inclusion of strings.h
The header strings.h was formerly only included for HP NonStop (aka
Tandem) to define strcasecmp, but another platform requiring this
inclusion has been found.  The build system will now include the
file based on its presence determined by configure.

Signed-off-by: David Michael <fedora.dm0@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-15 10:17:39 -08:00
David Michael 110d698546 Detect when the passwd struct is missing pw_gecos
NO_GECOS_IN_PWENT was documented with other Makefile variables but was only
enforced by manually defining it to the C preprocessor.  This adds support
for detecting the condition with configure and defining the make variable.

Signed-off-by: David Michael <fedora.dm0@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-15 10:15:45 -08:00
David Michael 6ede720529 Support builds when sys/param.h is missing
An option is added to the Makefile to skip the inclusion of sys/param.h.
The only known platform with this condition thus far is the z/OS UNIX System
Services environment.

Signed-off-by: David Michael <fedora.dm0@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-15 10:13:23 -08:00
Stefano Lattarini dd6fc7ca91 Makefile: whitespace style fixes in macro definitions
Consistently use a single space before and after the "=" (or ":=", "+=",
etc.) in assignments to make macros.  Granted, this was not a big deal,
but I did find the needless inconsistency quite distracting.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-10 08:35:56 -08:00
Junio C Hamano 77b598b438 Merge branch 'maint'
* maint:
  Fix typo in remote set-head usage
  Makefile: hide stderr of curl-config test
2012-11-26 14:12:07 -08:00
Paul Gortmaker cad06d4d78 Makefile: hide stderr of curl-config test
You will get

    $ make distclean 2>&1 | grep curl
    /bin/sh: curl-config: not found
    /bin/sh: curl-config: not found
    /bin/sh: curl-config: not found
    /bin/sh: curl-config: not found
    /bin/sh: curl-config: not found
    $

if you don't have a curl development package installed.

The intent is not to alarm the user, but just to test if there is
a new enough curl installed.  However, if you look at search engine
suggested completions, the above "error" messages are confusing
people into thinking curl is a hard requirement.

Redirect this error output to /dev/null as it is not necessary to be
shown to the end users.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-26 10:31:11 -08:00
Junio C Hamano 2f2c7e1252 Merge branch 'ml/cygwin-mingw-headers'
Make git compile on cygwin with newer header files.

* ml/cygwin-mingw-headers:
  USE CGYWIN_V15_WIN32API as macro to select api for cygwin
  Update cygwin.c for new mingw-64 win32 api headers
2012-11-20 10:44:29 -08:00
Mark Levedahl 9fca6cffc0 USE CGYWIN_V15_WIN32API as macro to select api for cygwin
The previous macro was confusing to some, and did not include "cygwin" in
its name. The updated name more clearly expresses a choice of the
win32api implementation that shipped with version 1.5 of cygwin.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-18 20:02:40 -08:00
Junio C Hamano 1f0335a63f Merge branch 'js/hp-nonstop'
Finishing touches to port to HP NonStop continues.

* js/hp-nonstop:
  fix 'make test' for HP NonStop
2012-11-15 10:24:13 -08:00
Mark Levedahl 380a4d927b Update cygwin.c for new mingw-64 win32 api headers
The cygwin project recently switched to a new implementation of the
windows api, now using header files from the mingw-64 project. These
new header files are incompatible with the way cygwin.c included the
old headers: cygwin.c can be compiled using the new or the older (mingw)
headers, but different files must be included in different order for each
to work. The new headers are in use only for the current release series
(based upon the v1.7.x dll version). The previous release series using
the v1.5 dll is kept available but unmaintained for use on older versions
of Windows. So, patch cygwin.c to use the new include ordering only if
the dll version is 1.7 or higher.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
2012-11-12 15:47:50 -05:00
Joachim Schmitz 50e6af7daf fix 'make test' for HP NonStop
This fixes the vast majority of test failures on HP NonStop.
Some test don't work with /bin/diff, some fail with /bin/tar,
so let's put /usr/local/bin in PATH first.
Some tests fail with /bin/sh (link to /bin/ksh) so use bash instead

Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de>
Signed-off-by: Jeff King <peff@peff.net>
2012-10-30 07:12:18 -04:00
Nguyễn Thái Ngọc Duy 745f7a8cac fetch-pack: move core code to libgit.a
fetch_pack() is used by transport.c, part of libgit.a while it stays
in builtin/fetch-pack.c. Move it to fetch-pack.c so that we won't get
undefined reference if a program that uses libgit.a happens to pull it
in.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
2012-10-29 03:40:29 -04:00
Nguyễn Thái Ngọc Duy f5d942e1ed send-pack: move core code to libgit.a
send_pack() is used by transport.c, part of libgit.a while it stays in
builtin/send-pack.c. Move it to send-pack.c so that we won't get
undefined reference if a program that uses libgit.a happens to pull it
in.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
2012-10-29 03:08:30 -04:00
Nguyễn Thái Ngọc Duy db699a8a1f Move try_merge_command and checkout_fast_forward to libgit.a
These functions are called in sequencer.c, which is part of
libgit.a. This makes libgit.a potentially require builtin/merge.c for
external git commands.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
2012-10-29 03:08:30 -04:00
Jeff King 530f237500 Merge branch 'fa/remote-svn'
A GSoC project.

* fa/remote-svn:
  Add a test script for remote-svn
  remote-svn: add marks-file regeneration
  Add a svnrdump-simulator replaying a dump file for testing
  remote-svn: add incremental import
  remote-svn: Activate import/export-marks for fast-import
  Create a note for every imported commit containing svn metadata
  vcs-svn: add fast_export_note to create notes
  Allow reading svn dumps from files via file:// urls
  remote-svn, vcs-svn: Enable fetching to private refs
  When debug==1, start fast-import with "--stats" instead of "--quiet"
  Add documentation for the 'bidi-import' capability of remote-helpers
  Connect fast-import to the remote-helper via pipe, adding 'bidi-import' capability
  Add argv_array_detach and argv_array_free_detached
  Add svndump_init_fd to allow reading dumps from arbitrary FDs
  Add git-remote-testsvn to Makefile
  Implement a remote helper for svn in C
2012-10-25 06:42:02 -04:00
Ramsay Jones 1266686b97 MALLOC_CHECK: Allow checking to be disabled from config.mak
The malloc checks can be disabled using the TEST_NO_MALLOC_CHECK
variable, either from the environment or command line of an
'make test' invocation. In order to allow the malloc checks to be
disabled from the 'config.mak' file, we add TEST_NO_MALLOC_CHECK
to the environment using an export directive.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-10 11:15:35 -07:00
Florian Achleitner 48ea9f955f Add git-remote-testsvn to Makefile
The link-rule is a copy of the standard git$X rule but adds VCSSVN_LIB.
Add executable to .gitignore.

Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-07 14:10:16 -07:00
Junio C Hamano cbea001a86 Merge branch 'js/hp-nonstop'
Port to HP NonStop aka Tandem.

* js/hp-nonstop:
  Port to HP NonStop
2012-09-25 10:40:21 -07:00
Junio C Hamano d782797aaf Merge branch 'js/poll-emu'
* js/poll-emu:
  make poll() work on platforms that can't recv() on a non-socket
  poll() exits too early with EFAULT if 1st arg is NULL
  fix some win32 specific dependencies in poll.c
  make poll available for other platforms lacking it
2012-09-25 10:40:18 -07:00
Joachim Schmitz 6c109904bc Port to HP NonStop
Includes the addition of some new defines and their description for others to use.

Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-19 17:31:25 -07:00
Junio C Hamano 3b0b6b53d5 Merge branch 'mh/string-list'
* mh/string-list:
  api-string-list.txt: initialize the string_list the easy way
  string_list: add a function string_list_longest_prefix()
  string_list: add a new function, string_list_remove_duplicates()
  string_list: add a new function, filter_string_list()
  string_list: add two new functions for splitting strings
  string_list: add function string_list_append_nodup()
2012-09-17 15:53:31 -07:00
Joachim Schmitz 6d45eb1720 make poll available for other platforms lacking it
move poll.[ch] out of compat/win32/ into compat/poll/ and adjust
Makefile with the changed paths. Adding comments to Makefile about
how/when to enable it and add logic for this

Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-17 15:42:57 -07:00
Junio C Hamano 067a1f552e Merge branch 'js/compat-itimer'
Pieces to support compilation on __TANDEM.

* js/compat-itimer:
  Add a no-op setitimer() wrapper
2012-09-12 14:21:44 -07:00
Junio C Hamano e15f390b15 Merge branch 'js/compat-mkdir'
Finishing touches to recently added wrapper for mkdir() that do not
want to see trailing slashes.

* js/compat-mkdir:
  Document MKDIR_WO_TRAILING_SLASH in Makefile
2012-09-12 14:21:39 -07:00
Michael Haggerty ff919f965d string_list: add two new functions for splitting strings
Add two new functions, string_list_split() and
string_list_split_in_place().  These split a string into a string_list
on a separator character.  The first makes copies of the substrings
(leaving the input string untouched) and the second splits the
original string in place, overwriting the separator characters with
NULs and referring to the original string's memory.

These functions are similar to the strbuf_split_*() functions except
that they work with the more powerful string_list interface.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-12 11:43:24 -07:00
Junio C Hamano efe0a206a2 Merge branch 'rj/test-regex'
Git ships with a fall-back regexp implementation for platforms with
buggy regexp library; give people a tool to see if they should be
using it on their platform.

* rj/test-regex:
  test-regex: Add a test to check for a bug in the regex routines
2012-09-11 11:36:25 -07:00
Joachim Schmitz dc9f462d42 Document MKDIR_WO_TRAILING_SLASH in Makefile
Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-08 20:40:06 -07:00
Joachim Schmitz 7f9e848cf8 Add a no-op setitimer() wrapper
The current code uses setitimer() only for reducing perceived
latency.  On platforms that lack setitimer() (e.g. HP NonStop),
allow builders to say "make NO_SETITIMER=YesPlease" to use a no-op
substitute, as doing so would not affect correctness.

HP NonStop does provide struct itimerval, but other platforms may
not, so this is taken care of in this commit too, by setting
NO_STRUCT_ITIMERVAL.

Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-08 20:35:19 -07:00
Ramsay Jones c91841594c test-regex: Add a test to check for a bug in the regex routines
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-02 18:57:21 -07:00
Junio C Hamano cf8b350da8 Merge branch 'jk/check-docs-update'
Simplify "make check-docs" implementation and update its coverage.

* jk/check-docs-update:
  check-docs: get documented command list from Makefile
  check-docs: drop git-help special-case
  check-docs: list git-gui as a command
  check-docs: factor out command-list
  command-list: mention git-credential-* helpers
  command-list: add git-sh-i18n
  check-docs: update non-command documentation list
  check-docs: mention gitweb specially
2012-08-22 11:53:01 -07:00
Junio C Hamano e5acacfb48 Merge branch 'bw/maint-1.7.9-solaris-getpass'
The recent update to terminal I/O interface to get passwords &c
interactively didn't quite work on Solaris.

* bw/maint-1.7.9-solaris-getpass:
  Enable HAVE_DEV_TTY for Solaris
  terminal: seek when switching between reading and writing
2012-08-08 15:14:58 -07:00
Jeff King 5fafce0b78 check-docs: get documented command list from Makefile
The current code tries to get a list of documented commands
by doing "ls Documentation/git*txt" and culling a bunch of
special cases from the result. Looking for "git-*.txt" would
be more accurate, but would miss a few commands like
"gitweb" and "gitk".

Fortunately, Documentation/Makefile already knows what this
list is, so we can just ask it. Annoyingly, we still have to
post-process its output a little, since make will print
extra cruft like "GIT-VERSION-FILE is up to date" to stdout.

Now that our list is accurate, we can remove all of the ugly
special-cases.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-08-08 14:32:17 -07:00
Jeff King 7d02b574f4 check-docs: drop git-help special-case
The check-docs target special-cases git-help to avoid
mentioning it as "documented but removed". This dates back
to the early implementation of git-help, when its code was
simply included inside git.c.

These days it is a full-fledged builtin (in builtin/help.c)
and does not need special-casing.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-08-08 14:31:59 -07:00
Jeff King eb28501e15 check-docs: list git-gui as a command
git-gui is already documented and mentioned in command-list,
but adding it to the Makefile makes sure it is so. We also
add its alias git-citool (which is also documented).

As a result, we can drop them from the special case
statement that avoids them being listed as "documented but
does not exist".

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-08-08 14:31:41 -07:00
Jeff King cf6aaff377 check-docs: factor out command-list
The check-docs command list is composed from several
Makefile variables plus some special cases. Let's make the
meaning of the list more obvious and avoid repeating
ourselves by factoring it out.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-08-08 14:31:12 -07:00
Jeff King 1b7b522c26 check-docs: update non-command documentation list
The check-docs target looks at Documentation/git*txt and
complains if any entry does not have a matching command.
Therefore we need to explicitly ignore any entries which are
not meant to describe a command (like gitattributes.txt).
This list has grown stale over time, so let's bring it up to
date.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-08-08 12:11:53 -07:00
Jeff King 41c1709a56 check-docs: mention gitweb specially
Like gitk, gitweb is not listed in the usual Makefile
variables and must be fed to check-docs specially. Otherwise
check-docs thinks it is documented but removed.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-08-08 12:11:53 -07:00
Ben Walton 436783c95a Enable HAVE_DEV_TTY for Solaris
Now that git_terminal_prompt can cleanly interact with /dev/tty on
Solaris, enable HAVE_DEV_TTY so that this code path is used for
credential reading instead of relying on the crippled getpass().

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-08-06 22:12:43 -07:00
Johannes Sixt 9145b19ecf Makefile: use overridable $(FIND) instead of hard-coded 'find'
The Makefile already offers the variable $(FIND) and uses it except in one
place. Fix it.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-08-06 14:21:13 -07:00
Junio C Hamano 5fe1484a9b Merge branch 'jx/i18n-1.7.11'
Add i18n support for scripted Porcelains, and mark strings in
merge(-recursive), am, and rebase for i18n.

* jx/i18n-1.7.11:
  i18n: merge-recursive: mark strings for translation
  Remove dead code which contains bad gettext block
  i18n: am: mark more strings for translation
  rebase: remove obsolete and unused LONG_USAGE which breaks xgettext
  i18n: Rewrite gettext messages start with dash
  i18n: rebase: mark messages for translation
  i18n: New keywords for xgettext extraction from sh
2012-07-31 09:41:52 -07:00
Junio C Hamano ee9be06770 perl: detect new files in MakeMaker builds
While Makefile.PL now finds .pm files on its own, it does not
detect new files after it generates perl/perl.mak.

[ew: commit message, minor tweaks]

ref: http://mid.gmane.org/7vlii51xz4.fsf@alter.siamese.dyndns.org

Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-07-27 22:14:02 +00:00
Jiang Xin c2d140db08 i18n: New keywords for xgettext extraction from sh
Since we have additional shell wrappers (gettextln and eval_gettextln)
for gettext, we need to take into account these wrappers when running
'make pot' to extract messages from shell scripts.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Reviewed-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-25 10:06:50 -07:00
Junio C Hamano ebcfa444c4 Merge branch 'jn/block-sha1'
The code to load a word one-byte-at-a-time was optimized into a
word-wide load instruction even when the pointer was not aligned,
which caused issues on architectures that do not like unaligned
access.

* jn/block-sha1:
  Makefile: BLK_SHA1 does not require fast htonl() and unaligned loads
  block-sha1: put expanded macro parameters in parentheses
  block-sha1: avoid pointer conversion that violates alignment constraints
2012-07-23 20:56:47 -07:00
Junio C Hamano fee4426cdf Merge branch 'jn/make-assembly-in-right-directory'
* jn/make-assembly-in-right-directory:
  Makefile: fix location of listing produced by "make subdir/foo.s"
2012-07-23 20:56:39 -07:00
Jonathan Nieder f200197c39 Makefile: BLK_SHA1 does not require fast htonl() and unaligned loads
block-sha1/ is fast on most known platforms.  Clarify the Makefile to
be less misleading about that.

Early versions of block-sha1/ explicitly relied on fast htonl() and
fast 32-bit loads with arbitrary alignment.  Now it uses those on some
arches but the default behavior is byte-at-a-time access for the sake
of arches like ARM, Alpha, and their kin and it is still pretty fast
on these arches (fast enough to supersede the mozilla SHA1
implementation and the hand-written ARM assembler implementation that
were bundled before).

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-23 09:41:29 -07:00
Jonathan Nieder 1015cc4225 Makefile: fix location of listing produced by "make subdir/foo.s"
When I invoke "make block-sha1/sha1.s", 'make' runs $(CC) -S without
specifying where it should put its output and the output ends up in
./sha1.s.  Confusing.

Add an -o option to the .s rule to fix this.  We were already doing
that for most compiler invocations but had forgotten it for the
assembler listings.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-22 21:30:26 -07:00