Commit Graph

48564 Commits

Author SHA1 Message Date
Johannes Schindelin
0eb4e0f73c Merge pull request #24 from gitter-badger/gitter-badge
Add a Gitter chat badge to README.md
2015-03-05 10:34:20 +01:00
Johannes Schindelin
94f9f95e96 Merge pull request #14 from dscho/readme
Add a README.md for GitHub goodness.
2015-03-05 10:34:20 +01:00
Johannes Schindelin
4c5d32f0b5 Merge 'fix-is-exe' into HEAD 2015-03-05 10:34:20 +01:00
Johannes Schindelin
b8ed9d4f7f Merge 'fix-externals' into HEAD 2015-03-05 10:34:20 +01:00
Johannes Schindelin
b2aa1105e1 Merge 'remote-hg-prerequisites' into HEAD
These fixes were necessary for Sverre Rabbelier's remote-hg to work,
but for some magic reason they are not necessary for the current
remote-hg. Makes you wonder how that one gets away with it.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-05 10:34:19 +01:00
Johannes Schindelin
266fe325c9 Merge 'win-tests-fixes' into HEAD 2015-03-05 10:34:19 +01:00
Johannes Schindelin
76d42dabbd Skip t9020 with MSys2
POSIX-to-Windows path mangling would make it fail.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-05 10:34:08 +01:00
Johannes Schindelin
2bea79d621 Skip t0204 for MinGW Git
As per https://msdn.microsoft.com/en-us/library/x99tb11d.aspx:

	The set of available locale names, languages, country/region
	codes, and code pages includes all those supported by the Windows
	NLS API except code pages that require more than two bytes per
	character, such as UTF-7 and UTF-8.

Therefore, MinGW gettext cannot cope with UTF-8 at all, because it uses
the Win32 API internally.

However, when the test asks `locale -a` it reports that is_US.utf8 is
available, because that `locale` is actually an *MSys2* program (and MSys2
can cope with UTF-8 alright).

Let's just skip this test for MinGW Git altogether.

Helped-by: 마누엘 <nalla@users.noreply.github.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-05 10:34:08 +01:00
Johannes Schindelin
b8a9813bb2 t0200: disable more tests with MSys2 that rely on locale.exe
There is a MinGW gettext.exe, but still no MinGW locale.exe. Instead the
MSys2 locale.exe kicks in, which corresponds to the MSys2 gettext.exe,
however. Therefore some assumptions of t0200 cannot be fulfilled when
running inside MSys2.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-05 10:34:08 +01:00
Johannes Schindelin
b3a9fdb111 Mark t0027-auto-crlf as cheap enough for MinGW
t0027 is marked expensive, but really, for MinGW we want to run these
tests always.

Suggested by Thomas Braun.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-05 10:34:08 +01:00
Johannes Schindelin
c8c30da4a1 Teach t0027 about native end-of-lines
Without this patch, t0027 expects the native end-of-lines to be a single
line feed character. On Windows, however, we set it to a carriage return
character followed by a line feed character. Thus, we have to modify
t0027 to expect different warnings depending on the end-of-line markers.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-05 10:34:07 +01:00
Thomas Braun
41f11c9120 t0027: Disable test on MINGW
We can't mmap 2GB of RAM on our 32bit platform, so
just disable the test.

Signed-off-by: Thomas Braun <thomas.braun@byte-physics.de>
2015-03-05 10:34:07 +01:00
Thomas Braun
44b41245d8 t1508: Be more clever than msys path substitution
A string of the form "@/abcd" is considered a file path
by the msys layer and therefore translated to a windows path.

Here the trick is to double the slashes.

The msys patch translation can be studied with the following
test program:

 #include <stdio.h>
 #include <stdlib.h>

 int main(int argc, char** argv)
 {
 unsigned int i;
 for(i=1; i < argc; i++)
 	printf("argv[%d]=%s\n",i, argv[i]);

 exit(0);
 }

Signed-off-by: Thomas Braun <thomas.braun@byte-physics.de>
2015-03-05 10:34:07 +01:00
Johannes Schindelin
7cbb613359 Merge branch 'some-CR-fixes'
This branch contains some hacks so that Git produces less CR, and then
some tests.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-04 19:03:30 +01:00
Johannes Schindelin
b26495b4ab Merge pull request #26 from dscho/msys2
Fixes required to build Git for Windows with MSys2
2015-03-04 19:03:29 +01:00
Thomas Braun
ad350e29af t5503: Mark flaky tests as known breakages
As non reliable tests are nasty.

Signed-off-by: Thomas Braun <thomas.braun@byte-physics.de>
2015-03-04 19:03:24 +01:00
Stepan Kasal
dac97716f9 Revert "test: fix t7001 cp to use POSIX options"
This reverts commit 00764ca1, as our ancient version of "cp" has
problems about the "new" POSIX option "-P" (yields exit code 1).
2015-03-04 19:00:01 +01:00
Stepan Kasal
7a75bcd5b6 tests: turn off git-daemon tests if FIFOs are not available
Signed-off-by: Stepan Kasal <kasal@ucw.cz>
2015-03-04 19:00:01 +01:00
Karsten Blees
59e60036f6 t800[12]: work around MSys limitation
MSys works very hard to convert Unix-style paths into DOS-style ones.
*Very* hard.

So hard, indeed, that

	git blame -L/hello/,/green/

is translated into something like

	git blame -LC:/msysgit/hello/,C:/msysgit/green/

As seen in msys_p2w in src\msys\msys\rt\src\winsup\cygwin\path.cc, line
3204ff:

	case '-':
	  //
	  // here we check for POSIX paths as attributes to a POSIX switch.
	  //
	...

seemingly absolute POSIX paths in single-letter options get expanded by
msys.dll unless they contain '=' or ';'.

So a quick and very dirty fix is to use '-L/;*evil/'. (Using an equal sign
works only when it is before a comma, so in the above example, /=*green/
would still be converted to a DOS-style path.)

Commit-message-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-04 19:00:00 +01:00
Pat Thoyts
53c82d6965 t0008: avoid absolute path on Windows as colon is used in the tests
The test separator char is a colon which means any absolute paths on windows
confuse the tests that use global_excludes.

Suggested-by: Karsten Blees <karsten.blees@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2015-03-04 19:00:00 +01:00
Johannes Schindelin
cebf43732f Work around a problem identified by BuildHive
Apparently the signal handling is not quite correct in the fsckobject
handling (most likely we rely on a side effect that lets us still output
some message after receiving a signal 13 but in the BuildHive setup this
fails intermittently).

As a consequence, the push in t5504 does fail as expected, but fails to
output anything (unexpected). Since this is good enough for now, let's
handle an empty output as success, too.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-04 19:00:00 +01:00
Sverre Rabbelier
c801f8d919 t9350: point out that refs are not updated correctly
This happens only when the corresponding commits are not exported in
the current fast-export run. This can happen either when the relevant
commit is already marked, or when the commit is explicitly marked
as UNINTERESTING with a negative ref by another argument.

This breaks fast-export basec remote helpers.

Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
2015-03-04 19:00:00 +01:00
Johannes Schindelin
a4ce3727a8 Handle new t1501 test case properly with MinGW
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-04 19:00:00 +01:00
Johannes Schindelin
9f67ab66fe mingw: Make sure sigset_t is defined
With MSys2, the sigset_t type is defined in sys/types.h, therefore we
need to #include said file.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-04 18:59:59 +01:00
Johannes Schindelin
5b4d26c103 MSys2: Fix t9700 assumption about directory separators
This test assumed that there are no two equivalent directory separators.
However, on Windows, the back slash and the forward slash *are*
equivalent. Let's paper over this issue by converting the backward
slashes to forward ones in the test that fails with MSys2 otherwise.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-04 18:59:59 +01:00
Johannes Schindelin
ba018212ec Git.pm: stop assuming that absolute paths start with a slash
This fixes t7800 with MSys2.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-04 18:59:59 +01:00
Johannes Schindelin
242092f5c1 mingw: Prepare the TMP environment variable for shell scripts
When shell scripts access a $TMP variable containing backslashes, they
will be mistaken for escape characters. Let's not let that happen by
converting them to forward slashes.

This fixes t7800 with MSys2.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-04 18:59:58 +01:00
Johannes Schindelin
7c7e3fc3f8 Tests: optionally skip redirecting stdin/stdout/stderr
There is a really useful debugging technique developed by Sverre
Rabbelier that inserts "bash &&" somewhere in the test scripts, letting
the developer interact at given points with the current state.

Another debugging technique, used a lot by this here coder, is to run
certain executables via gdb by guarding a "gdb -args" call in
bin-wrappers/git.

Both techniques were disabled by 781f76b1(test-lib: redirect stdin of
tests).

Let's reinstate the ability to run an interactive shell by making the
redirection optional: setting the TEST_NO_REDIRECT environment variable
will skip the redirection.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-04 18:59:45 +01:00
Johannes Schindelin
a9c144b375 t5516: override MinGW-specific pwd override
This test is susceptible to MSys2's posix-to-windows path mangling; Let's
just use POSIX paths throughout and let the tests pass.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-04 18:59:00 +01:00
Johannes Schindelin
6934b5ed4c Tests (MinGW): Disable mkfifo-based tests
With MSys2, there is actually an implementation of mkfifo available. The
only problem is that it is only emulating named pipes through the MSys2
runtime; The Win32 API has no idea about named pipes, hence the Git
executable cannot access those pipes either.

The symptom is that Git fails with a '<name>: No such file or directory'
because MSys2 emulates named pipes through special-crafted '.lnk' files.

The solution is to tell the test suite explicitly that we cannot use
named pipes when we want to test a MinGW Git.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-04 18:59:00 +01:00
Johannes Schindelin
eea8d168d0 Tests (MinGW): Do not bother to test funny file names
MSys2 actually allows to create files or directories whose names contain
tabs, newlines or colors, even if plain Win32 API cannot access them.
As we are using an MSys2 bash to run the tests, such files or
directories are created successfully, but Git has no chance to work with
them because it is a regular Windows program, hence limited by the Win32
API.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-04 18:59:00 +01:00
Johannes Schindelin
aee5bf176b Special-case the MSYS2_TZ environment variable
With MSys2, the "TZ" environment variable gets filtered out when calling
non-MSys2 executables. The reason is that Windows' time zone handling is
substantially different from the POSIX one.

However, we just taught Git for Windows' fork of the MSys2 runtime to
pass on the timezone in a different environment variable, MSYS2_TZ for
the sole purpose of Git being able to reinterpret it correctly.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-04 18:58:59 +01:00
Johannes Schindelin
2b87dee5f0 Error out when mingw_startup() *and* NO_UNSETENV are active
The unsetenv code has no idea to update our environ_size, therefore
causing segmentation faults when environment variables are removed
without compat/mingw.c's knowing (MinGW's optimized lookup would try
to strcmp() against NULL in such a case).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-04 18:58:59 +01:00
Johannes Schindelin
72b9d6c82f Squash compile warning with MSys2
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-04 18:58:59 +01:00
Johannes Schindelin
cb49764253 Do not trust MSys2's MinGW gettext.sh
It does not quite work because it produces DOS line endings which the
shell does not like at all.

This lets t3406, t3903, t4254, t7400, t7401, t7406 and t7407 pass.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-04 18:58:59 +01:00
Johannes Schindelin
59ebe27197 Let's use gettext with MSys2
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-04 18:58:59 +01:00
Johannes Schindelin
cca0aa6a61 Build Python stuff with MSys2
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-04 18:58:58 +01:00
Johannes Schindelin
8e17c5baa9 Start supporting 64-bit MSys2
This just makes things compile, the test suite most likely needs extra
tender loving care in addition to this change.

While at it, also allow building MSys2 Git (i.e. a Git that uses MSys2's
POSIX emulation layer).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-04 18:58:58 +01:00
Johannes Schindelin
cdfddc1f7a Start supporting MSys2 in config.mak.uname
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-04 18:58:58 +01:00
Johannes Schindelin
72bc84e31b Do not re-define _CONSOLE_FONT_INFOEX when compiling with MSys2
MSys2 already has that structure.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-04 18:58:58 +01:00
Johannes Schindelin
c054d91e72 Avoid redefining S_* constants
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-04 18:58:57 +01:00
Johannes Schindelin
1f9f3b216d Port header fixes from MSys2
MSys2' Git build script has some changes we should put into Git for
Windows' source code proper.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-04 18:58:57 +01:00
Johannes Schindelin
98f5f875e6 Help debugging with MSys2 by optionally executing bash with strace
MSys2's strace facility is very useful for debugging... With this patch,
the bash will be executed through strace if the environment variable
GIT_STRACE_COMMANDS is set, which comes in real handy when investigating
issues in the test suite.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-04 18:58:57 +01:00
Thomas Braun
447bae85d7 Enable support for perl regular expressions (LIBPCRE)
Signed-off-by: Thomas Braun <thomas.braun@byte-physics.de>
2015-03-04 18:58:57 +01:00
Sebastian Schuberth
beb8479000 Makefile: Set htmldir to match the default HTML docs location under MSYS
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
2015-03-04 18:58:57 +01:00
The Gitter Badger
db47e1ae6f Added Gitter badge 2015-03-04 18:58:56 +01:00
Sebastian Schuberth
517e3ed3e6 MinGW: Use MakeMaker to build the Perl libraries
This way the libraries get properly installed into the "site_perl"
directory and we just have to move them out of the "mingw" directory.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
2015-03-04 18:58:56 +01:00
Johannes Schindelin
5f874ef951 Add a README.md
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-04 17:59:36 +01:00
Johannes Schindelin
eed55563f2 Merge 'pull-rebase-interactive' into HEAD 2015-02-22 20:11:22 +01:00
Johannes Schindelin
40d26cdd7f Merge 'jberezanski/wincred-sso-r2' into HEAD 2015-02-22 20:11:21 +01:00