Commit Graph

48954 Commits

Author SHA1 Message Date
Johannes Schindelin
0a0ef263ec Merge 'win-tests-fixes' into HEAD 2015-03-06 18:13:38 +01:00
Johannes Schindelin
4c03b241d7 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-06 18:13:38 +01:00
Johannes Schindelin
a852a69043 Merge pull request #26 from dscho/msys2
Fixes required to build Git for Windows with MSys2
2015-03-06 18:13:38 +01:00
Johannes Schindelin
124dadd18e Merge 'pull-rebase-interactive' into HEAD 2015-03-06 18:13:38 +01:00
Johannes Schindelin
ce9184833b Merge 'jberezanski/wincred-sso-r2' into HEAD 2015-03-06 18:13:38 +01:00
Johannes Schindelin
4b7d5dc622 Merge 'gitweb-syntax' into HEAD 2015-03-06 18:13:38 +01:00
Johannes Schindelin
c3510adae0 Merge 'gitk' into HEAD 2015-03-06 18:13:38 +01:00
Johannes Schindelin
2df74a500a Merge 'git-gui' into HEAD 2015-03-06 18:13:38 +01:00
Johannes Schindelin
c2565b9b8a Merge 'criss-cross-merge' into HEAD 2015-03-06 18:13:37 +01:00
Johannes Schindelin
d69ba5f3be Merge 'am-submodules' into HEAD 2015-03-06 18:13:37 +01:00
Johannes Schindelin
5eeb39d0d2 Merge 'hide-dotgit' into HEAD 2015-03-06 18:13:37 +01:00
Johannes Schindelin
b8f8af0ad0 Merge 'unicode' into HEAD 2015-03-06 18:13:37 +01:00
Johannes Schindelin
a0d8291fe6 Merge 'refs/rewritten/junio/notyet' into HEAD 2015-03-06 18:13:37 +01:00
마누엘
07503cef3c mingw: Fix git-svn tests
There are some issues with the git-svn test cases when they are
being run on windows under a MINGW build. Some things are not
available like the changing of the execute flag of shell scripts
via the chmod command. Also there were problems with folder names
that end with a dot on windows.

Signed-off-by: 마누엘 <nalla@users.noreply.github.com>
2015-03-06 18:10:46 +01:00
Johannes Schindelin
88a8f5d9a5 Skip t9020 with MSys2
POSIX-to-Windows path mangling would make it fail.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-06 18:10:46 +01:00
Johannes Schindelin
6a4c0a6b3b 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-06 18:10:46 +01:00
Johannes Schindelin
1fc024f57b 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-06 18:10:46 +01:00
Johannes Schindelin
de31cc0a4b 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-06 18:10:46 +01:00
Johannes Schindelin
4969c8fe2b 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-06 18:10:46 +01:00
Thomas Braun
500535ac93 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-06 18:10:46 +01:00
Thomas Braun
8527afd683 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-06 18:10:46 +01:00
Thomas Braun
54fd864c0e 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-06 18:10:46 +01:00
Stepan Kasal
d0021d3348 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-06 18:10:46 +01:00
Stepan Kasal
f78600145a tests: turn off git-daemon tests if FIFOs are not available
Signed-off-by: Stepan Kasal <kasal@ucw.cz>
2015-03-06 18:10:46 +01:00
Karsten Blees
a8392153bb 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-06 18:10:46 +01:00
Johannes Schindelin
70a109d6e7 Windows: make sure that merge-octopus only outputs LF line endings
This happens to shut up t7602 on Windows which would otherwise take
the different line endings for a sign that the merge failed.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-06 18:10:45 +01:00
Pat Thoyts
53c6601e43 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-06 18:10:45 +01:00
Sebastian Schuberth
53efcf2f59 am: Use cat instead of echo to avoid DOS line-endings (fixes t4150)
Along the lines of 05d0e3b and f33946d, use cat instead of echo to avoid
line ending mismatches in the test result of "am empty-file does not
infloop" which make the test fail.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
2015-03-06 18:10:45 +01:00
Johannes Schindelin
d64ca8a6e6 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-06 18:10:45 +01:00
Sebastian Schuberth
6530627728 submodule: Fix t7400, t7405, t7406 for msysGit
Again, avoid using echo (which issues DOS line endings on msysGit) to not mix
with Unix line-endings issued by git built-ins, even if this is at the cost of
calling an external executable (cat) instead of a shell built-in (echo).
2015-03-06 18:10:45 +01:00
Sverre Rabbelier
cfdd636ebe 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-06 18:10:45 +01:00
Johannes Schindelin
2ae57dea64 Handle new t1501 test case properly with MinGW
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-06 18:10:45 +01:00
마누엘
3016015681 mingw: Try to delete target directory first.
When the rename function tries to move a directory it fails if the target
directory exists. It should check if it can delete the (possibly empty)
target directory and then try again to move the directory.

Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: 마누엘 <nalla@users.noreply.github.com>
2015-03-06 18:10:44 +01:00
Johannes Schindelin
e494f7af27 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-06 18:10:44 +01:00
Johannes Schindelin
bd7aa1cea9 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-06 18:10:44 +01:00
Johannes Schindelin
ceabeb0877 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-06 18:10:44 +01:00
Johannes Schindelin
80c283b8a5 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-06 18:10:44 +01:00
Johannes Schindelin
0a6b3458b5 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-06 18:10:44 +01:00
Johannes Schindelin
a675086ca0 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-06 18:10:44 +01:00
Johannes Schindelin
3e859a13a7 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-06 18:10:44 +01:00
Johannes Schindelin
88f8be9872 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-06 18:10:44 +01:00
Johannes Schindelin
8d2c9fd30c 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-06 18:10:44 +01:00
Johannes Schindelin
3871ed52ba 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-06 18:10:43 +01:00
Johannes Schindelin
cddb6b720f Squash compile warning with MSys2
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-06 18:10:43 +01:00
Johannes Schindelin
532cc0dbdb 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-06 18:10:43 +01:00
Johannes Schindelin
fdfadac5de Let's use gettext with MSys2
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-06 18:10:43 +01:00
Johannes Schindelin
c56443572a Build Python stuff with MSys2
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-06 18:10:43 +01:00
Johannes Schindelin
fd2546949c 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-06 18:10:43 +01:00
Johannes Schindelin
ead812d72a Start supporting MSys2 in config.mak.uname
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-06 18:10:43 +01:00
Johannes Schindelin
9b25bf214e 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-06 18:10:43 +01:00