summaryrefslogtreecommitdiff
path: root/compat
Commit message (Collapse)AuthorAgeFilesLines
* precompose-utf8: fix spelling of "want" in error messageStefano Lattarini2013-04-121-1/+1
| | | | | | | | | Noticed using Lucas De Marchi's codespell tool. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* compat/nedmalloc: fix spelling in commentsStefano Lattarini2013-04-121-3/+3
| | | | | | | | | Correct some typos found using Lucas De Marchi's codespell tool. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* compat/regex: fix spelling and grammar in commentsStefano Lattarini2013-04-123-6/+6
| | | | | | | | | | | Some of these were found using Lucas De Marchi's codespell tool. Others noticed by Eric Sunshine. Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* obstack: fix spelling of similarStefano Lattarini2013-04-121-1/+1
| | | | | | | | | Noticed using Lucas De Marchi's codespell tool. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Revert "compat: add strtok_r()"Erik Faye-Lund2013-02-261-61/+0
| | | | | | | | | | | | This reverts commit 78457bc0ccc1af8b9eb776a0b17986ebd50442bc. commit 28c5d9e ("vcs-svn: drop string_pool") previously removed the only call-site for strtok_r. So let's get rid of the compat implementation as well. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'nd/wildmatch'Junio C Hamano2013-01-101-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows pathname patterns in .gitignore and .gitattributes files with double-asterisks "foo/**/bar" to match any number of directory hierarchies. * nd/wildmatch: wildmatch: replace variable 'special' with better named ones compat/fnmatch: respect NO_FNMATCH* even on glibc wildmatch: fix "**" special case t3070: Disable some failing fnmatch tests test-wildmatch: avoid Windows path mangling Support "**" wildcard in .gitignore and .gitattributes wildmatch: make /**/ match zero or more directories wildmatch: adjust "**" behavior wildmatch: fix case-insensitive matching wildmatch: remove static variable force_lower_case wildmatch: make wildmatch's return value compatible with fnmatch t3070: disable unreliable fnmatch tests Integrate wildmatch to git wildmatch: follow Git's coding convention wildmatch: remove unnecessary functions Import wildmatch from rsync ctype: support iscntrl, ispunct, isxdigit and isprint ctype: make sane_ctype[] const array Conflicts: Makefile
| * compat/fnmatch: respect NO_FNMATCH* even on glibcNguyễn Thái Ngọc Duy2013-01-011-1/+2
| | | | | | | | | | Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'ss/nedmalloc-compilation'Junio C Hamano2013-01-031-1/+4
|\ \ | | | | | | | | | | | | * ss/nedmalloc-compilation: nedmalloc: Fix a compile warning (exposed as error) with GCC 4.7.2
| * | nedmalloc: Fix a compile warning (exposed as error) with GCC 4.7.2Sebastian Schuberth2012-12-111-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On MinGW, GCC 4.7.2 complains about operation on 'p->m[end]' may be undefined Fix this by replacing the faulty lines with those of 69825ca from https://github.com/ned14/nedmalloc/blob/master/nedmalloc.c Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'jc/maint-fnmatch-old-style-definition'Junio C Hamano2013-01-031-12/+12
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update old-style function definition "int foo(bar) int bar; {}" to "int foo(int bar) {}". * jc/maint-fnmatch-old-style-definition: compat/fnmatch: update old-style definition to ANSI
| * | | compat/fnmatch: update old-style definition to ANSIJunio C Hamano2012-12-191-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We try to avoid touching borrowed code, but we encourage people to write without old-style definition and compile with -Werror these days, and on platforms that need to use NO_FNMATCH, these three functions make the compilation fail. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Merge branch 'nd/maint-compat-fnmatch-fix' into maintJunio C Hamano2012-11-271-1/+1
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * nd/maint-compat-fnmatch-fix: compat/fnmatch: fix off-by-one character class's length check
* | \ \ \ Merge branch 'ef/mingw-rmdir'Junio C Hamano2012-12-111-1/+3
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MinGW has a workaround when rmdir unnecessarily fails to retry with a prompt, but the logic was kicking in when the rmdir failed with ENOTEMPTY, i.e. was expected to fail and there is no point retrying. * ef/mingw-rmdir: mingw_rmdir: do not prompt for retry when non-empty
| * | | | | mingw_rmdir: do not prompt for retry when non-emptyErik Faye-Lund2012-12-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in ab1a11be ("mingw_rmdir: set errno=ENOTEMPTY when appropriate"), a check was added to prevent us from retrying to delete a directory that is both in use and non-empty. However, this logic was slightly flawed; since we didn't return immediately, we end up falling out of the retry-loop, but right into the prompting-loop. Fix this by setting errno, and guarding the prompting-loop with an errno-check. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | mingw: get rid of getpass implementationErik Faye-Lund2012-12-042-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no remaining call-sites, and as pointed out in the previous commit message, it's not quite ideal. So let's just lose it. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | mingw: reuse tty-version of git_terminal_promptErik Faye-Lund2012-12-041-9/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The getpass-implementation we use on Windows isn't at all ideal; it works in raw-mode (as opposed to cooked mode), and as a result does not deal correcly with deletion, arrow-keys etc. Instead, use cooked mode to read a line at the time, allowing the C run-time to process the input properly. Since we set files to be opened in binary-mode by default on Windows, introduce a FORCE_TEXT macro that expands to the "t" modifier that forces the terminal to be opened in text-mode so we do not have to deal with CRLF issues. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | compat/terminal: separate input and output handlesErik Faye-Lund2012-12-041-11/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, the terminal cannot be opened in read-write mode, so we need distinct pairs for reading and writing. Since this works fine on other platforms as well, always open them in pairs. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | compat/terminal: factor out echo-disablingErik Faye-Lund2012-12-041-18/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By moving the echo-disabling code to a separate function, we can implement OS-specific versions of it for non-POSIX platforms. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | mingw: make fgetc raise SIGINT if apropriateErik Faye-Lund2012-12-042-10/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set a control-handler to prevent the process from terminating, and simulate SIGINT so it can be handled by a signal-handler as usual. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | mingw: correct exit-code for SIGALRM's SIG_DFLErik Faye-Lund2012-12-041-2/+5
| |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure SIG_DFL for SIGALRM exits with 128 + SIGALRM so other processes can diagnose why it exits. While we're at it, make sure we only write to stderr if it's a terminal, and change the output to match that of Linux. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'nd/maint-compat-fnmatch-fix'Junio C Hamano2012-11-251-1/+1
|\ \ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | * nd/maint-compat-fnmatch-fix: compat/fnmatch: fix off-by-one character class's length check
| * | | | compat/fnmatch: fix off-by-one character class's length checkNguyễn Thái Ngọc Duy2012-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Character class "xdigit" is the only one that hits 6 character limit defined by CHAR_CLASS_MAX_LENGTH. All other character classes are 5 character long and therefore never caught by this. This should make xdigit tests in t3070 pass on Windows. Reported-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Merge branch 'rr/precompose-utf8-cleanup' into maintJunio C Hamano2012-09-111-25/+19
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * rr/precompose-utf8-cleanup: precompose-utf8: do not call checks for non-ascii "utf8" cleanup precompose_utf8
* | | | | | USE CGYWIN_V15_WIN32API as macro to select api for cygwinMark Levedahl2012-11-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | Update cygwin.c for new mingw-64 win32 api headersMark Levedahl2012-11-121-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | Merge branch 'js/mingw-fflush-errno'Jeff King2012-10-252-0/+25
|\ \ \ \ \ \ | | |_|/ / / | |/| | / / | |_|_|/ / |/| | | | * js/mingw-fflush-errno: maybe_flush_or_die: move a too-loose Windows specific error
| * | | | maybe_flush_or_die: move a too-loose Windows specific errorJohannes Sixt2012-10-172-0/+25
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | check to compat Commit b2f5e268 (Windows: Work around an oddity when a pipe with no reader is written to) introduced a check for EINVAL after fflush() to fight spurious "Invalid argument" errors on Windows when a pipe was broken. But this check may hide real errors on systems that do not have the this odd behavior. Introduce an fflush wrapper in compat/mingw.* so that the treatment is only applied on Windows. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Merge branch 'bw/maint-1.7.9-solaris-getpass' into maint-1.7.11Junio C Hamano2012-08-241-0/+1
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * bw/maint-1.7.9-solaris-getpass: Enable HAVE_DEV_TTY for Solaris terminal: seek when switching between reading and writing
* | | | | make poll() work on platforms that can't recv() on a non-socketJoachim Schmitz2012-09-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This way it just got added to gnulib too the other day. Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | poll() exits too early with EFAULT if 1st arg is NULLJoachim Schmitz2012-09-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If poll() is used as a milli-second sleep, like in help.c, by passing a NULL in the 1st and a 0 in the 2nd arg, it exits with EFAULT. As per Paolo Bonzini, the original author, this is a bug and to be fixed Like in this commit, which is not to exit if the 2nd arg is 0. It got fixed In gnulib in the same manner the other day. Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | fix some win32 specific dependencies in poll.cJoachim Schmitz2012-09-171-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order for non-win32 platforms to be able to use poll.c, #ifdef the inclusion of two header files properly Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | make poll available for other platforms lacking itJoachim Schmitz2012-09-172-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | Merge branch 'js/compat-mkdir'Junio C Hamano2012-09-031-0/+24
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some mkdir(2) implementations do not want to see trailing slash in its parameter. * js/compat-mkdir: compat: some mkdir() do not like a slash at the end
| * | | | | compat: some mkdir() do not like a slash at the endJoachim Schmitz2012-08-241-0/+24
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a compatibility helper for platforms with such a mkdir(). Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'rr/precompose-utf8-cleanup'Junio C Hamano2012-08-291-25/+19
|\ \ \ \ \ | |/ / / / |/| | | / | | |_|/ | |/| | | | | | * rr/precompose-utf8-cleanup: precompose-utf8: do not call checks for non-ascii "utf8" cleanup precompose_utf8
| * | | precompose-utf8: do not call checks for non-ascii "utf8"Junio C Hamano2012-08-201-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As suggested by Linus, this function is not checking UTF-8-ness of the string; it only is seeing if it is pure US-ASCII. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | cleanup precompose_utf8Robin Rosenberg2012-08-171-20/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove extraneous parentheses and braces; - Remove redundant NUL-termination before strcpy(); - Check result of unlink when probing for decomposed file names; - Adjust for the coding style by adding missing whitespaces; - Move storage class "static" at the beginning of the decl. Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'bw/maint-1.7.9-solaris-getpass'Junio C Hamano2012-08-081-0/+1
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | terminal: seek when switching between reading and writingJeff King2012-08-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a stdio stream is opened in update mode (e.g., "w+"), the C standard forbids switching between reading or writing without an intervening positioning function. Many implementations are lenient about this, but Solaris libc will flush the recently-read contents to the output buffer. In this instance, that meant writing the non-echoed password that the user just typed to the terminal. Fix it by inserting a no-op fseek between the read and write. The opposite direction (writing followed by reading) is also disallowed, but our intervening fflush is an acceptable positioning function for that alternative. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'tb/sanitize-decomposed-utf-8-pathname'Junio C Hamano2012-07-132-0/+235
|\ \ \ \ | | |/ / | |/| / | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | Teaches git to normalize pathnames read from readdir(3) and all arguments from the command line into precomposed UTF-8 (assuming that they come as decomposed UTF-8) to work around issues on Mac OS. I think there still are other places that need conversion (e.g. paths that are read from stdin for some commands), but this should be a good first step in the right direction. * tb/sanitize-decomposed-utf-8-pathname: git on Mac OS and precomposed unicode
| * | git on Mac OS and precomposed unicodeTorsten Bögershausen2012-07-082-0/+235
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mac OS X mangles file names containing unicode on file systems HFS+, VFAT or SAMBA. When a file using unicode code points outside ASCII is created on a HFS+ drive, the file name is converted into decomposed unicode and written to disk. No conversion is done if the file name is already decomposed unicode. Calling open("\xc3\x84", ...) with a precomposed "Ä" yields the same result as open("\x41\xcc\x88",...) with a decomposed "Ä". As a consequence, readdir() returns the file names in decomposed unicode, even if the user expects precomposed unicode. Unlike on HFS+, Mac OS X stores files on a VFAT drive (e.g. an USB drive) in precomposed unicode, but readdir() still returns file names in decomposed unicode. When a git repository is stored on a network share using SAMBA, file names are send over the wire and written to disk on the remote system in precomposed unicode, but Mac OS X readdir() returns decomposed unicode to be compatible with its behaviour on HFS+ and VFAT. The unicode decomposition causes many problems: - The names "git add" and other commands get from the end user may often be precomposed form (the decomposed form is not easily input from the keyboard), but when the commands read from the filesystem to see what it is going to update the index with already is on the filesystem, readdir() will give decomposed form, which is different. - Similarly "git log", "git mv" and all other commands that need to compare pathnames found on the command line (often but not always precomposed form; a command line input resulting from globbing may be in decomposed) with pathnames found in the tree objects (should be precomposed form to be compatible with other systems and for consistency in general). - The same for names stored in the index, which should be precomposed, that may need to be compared with the names read from readdir(). NFS mounted from Linux is fully transparent and does not suffer from the above. As Mac OS X treats precomposed and decomposed file names as equal, we can - wrap readdir() on Mac OS X to return the precomposed form, and - normalize decomposed form given from the command line also to the precomposed form, to ensure that all pathnames used in Git are always in the precomposed form. This behaviour can be requested by setting "core.precomposedunicode" configuration variable to true. The code in compat/precomposed_utf8.c implements basically 4 new functions: precomposed_utf8_opendir(), precomposed_utf8_readdir(), precomposed_utf8_closedir() and precompose_argv(). The first three are to wrap opendir(3), readdir(3), and closedir(3) functions. The argv[] conversion allows to use the TAB filename completion done by the shell on command line. It tolerates other tools which use readdir() to feed decomposed file names into git. When creating a new git repository with "git init" or "git clone", "core.precomposedunicode" will be set "false". The user needs to activate this feature manually. She typically sets core.precomposedunicode to "true" on HFS and VFAT, or file systems mounted via SAMBA. Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Documentation: Fix misspellingsLeila Muhtasib2012-06-221-1/+1
|/ / | | | | | | | | Signed-off-by: Leila Muhtasib <muhtasib@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'nd/threaded-index-pack'Junio C Hamano2012-05-141-0/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enables threading in index-pack to resolve base data in parallel. By Nguyễn Thái Ngọc Duy (3) and Ramsay Jones (1) * nd/threaded-index-pack: index-pack: disable threading if NO_PREAD is defined index-pack: support multithreaded delta resolving index-pack: restructure pack processing into three main functions compat/win32/pthread.h: Add an pthread_key_delete() implementation
| * | compat/win32/pthread.h: Add an pthread_key_delete() implementationRamsay Jones2012-04-111-0/+5
| | | | | | | | | | | | | | | | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | remove superfluous newlines in error messagesPete Wyckoff2012-04-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The error handling routines add a newline. Remove the duplicate ones in error messages. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'rj/mingw-isguid'Junio C Hamano2012-04-231-3/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | By Ramsay Jones * rj/mingw-isguid: compat/mingw.h: Set S_ISUID to prevent a fast-import test failure
| * | | compat/mingw.h: Set S_ISUID to prevent a fast-import test failureRamsay Jones2012-04-181-3/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current t9300-fast-import.sh test number 62 ("L: nested tree copy does not corrupt deltas") was introduced in commit 9a0edb79 ("fast-import: add a test for tree delta base corruption", 15-08-2011). A fix for the demonstrated problem was introduced by commit 8fb3ad76 ("fast-import: prevent producing bad delta", 15-08-2011). However, this fix didn't work on MinGW and so this test has always failed on MinGW. Part of the solution in commit 8fb3ad76 was to add an NO_DELTA preprocessor constant which was defined as follows: +/* + * We abuse the setuid bit on directories to mean "do not delta". + */ +#define NO_DELTA S_ISUID + Unfortunately, the S_ISUID constant on MinGW is defined as zero. In order to fix the problem, we simply alter the definition of S_ISUID in the mingw header file to a more appropriate value. Also, we take the opportunity to similarly define S_ISGID and S_ISVTX. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'jk/run-command-eacces'Junio C Hamano2012-04-202-4/+6
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | When PATH contains an unreadable directory, alias expansion code did not kick in, and failed with an error that said "git-subcmd" was not found. By Jeff King (1) and Ramsay Jones (1) * jk/run-command-eacces: run-command: treat inaccessible directories as ENOENT compat/mingw.[ch]: Change return type of exec functions to int
| * | compat/mingw.[ch]: Change return type of exec functions to intRamsay Jones2012-04-052-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The POSIX standard specifies a return type of int for all six exec functions. In addition, all exec functions return -1 on error, and simply do not return on success. However, the current emulation of the exec functions on mingw are declared with a void return type. This would cause a problem should any code attempt to call the exec function in a non-void context. In particular, if an exec function were used in a conditional it would fail to compile. In order to improve the fidelity of the emulation, we change the return type of the mingw_execv[p] functions to int and return -1 on error. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'bw/inet-pton-ntop-compat'Junio C Hamano2012-02-122-12/+0
|\ \ \ | |/ / |/| | | | | | | | * bw/inet-pton-ntop-compat: Drop system includes from inet_pton/inet_ntop compatibility wrappers