Commit Graph

48493 Commits

Author SHA1 Message Date
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
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
f5c347ca26 Handle http.* config variables pointing to files gracefully on Windows
On Windows, we would like to be able to have a default http.sslCAinfo
that points to an MSys path (i.e. relative to the installation root of
Git).  As Git is a MinGW program, it has to handle the conversion
of the MSys path into a MinGW32 path itself.

Since system_path() considers paths starting with '/' as absolute, we
have to convince it to make a Windows path by stripping the leading
slash.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 20:09:49 +01:00
Johannes Schindelin
a7f17aa223 Start the merging-rebase to v2.3.0
This commit starts the rebase of 3fa02b8 to 42de6ed
2015-02-22 19:58:07 +01:00
dscho
ff4771bae9 Merge pull request #26 from dscho/msys2
Fixes required to build Git for Windows with MSys2
2015-02-22 20:39:24 +01:00
Johannes Schindelin
119830d2d6 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-02-22 18:57:20 +01:00
Johannes Schindelin
b528e9430a 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-02-22 18:57:19 +01:00
Johannes Schindelin
1f8add0600 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-02-22 18:57:19 +01:00
Johannes Schindelin
5c658f4f5b 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-02-22 18:57:19 +01:00
Johannes Schindelin
a9b3c2b408 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-02-22 18:57:19 +01:00
Johannes Schindelin
3153820216 fixup! t5000: Fix CRLF vs LF issue
MSys2's `tr` does not introduce any CRLFs...

This reverts commit 01a6f1b248.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 18:57:19 +01:00
Johannes Schindelin
34fc6de873 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-02-22 18:57:18 +01:00
Johannes Schindelin
93dd46ccbf 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-02-22 18:57:18 +01:00
Johannes Schindelin
fb3ca797e6 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-02-22 18:57:18 +01:00
Johannes Schindelin
ad5d003251 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-02-22 18:57:18 +01:00
Johannes Schindelin
af5bef8d6d Squash compile warning with MSys2
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 18:57:18 +01:00
Johannes Schindelin
626bfc1a0d Let's use gettext and Python with MSys2
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 18:57:17 +01:00
Johannes Schindelin
5bf9db5118 Build Python stuff with MSys2
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 18:57:17 +01:00
Johannes Schindelin
393f70f609 WIP: Support 64-bit MSys2
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 18:57:17 +01:00
Johannes Schindelin
d4fcc46ee3 Start supporting MSys2 in config.mak.uname
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 18:57:17 +01:00
Johannes Schindelin
e8cb19e5dd 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-02-22 18:56:58 +01:00
Johannes Schindelin
d594d61c1a Avoid redefining S_* constants
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 18:56:13 +01:00
Johannes Schindelin
8e8c7416c0 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-02-22 18:55:36 +01:00
Johannes Schindelin
b9e7a5531f 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-02-22 18:50:06 +01:00
dscho
daea1991fd Merge pull request #24 from gitter-badger/gitter-badge
Add a Gitter chat badge to README.md
2015-02-19 12:36:26 +01:00
The Gitter Badger
e125602277 Added Gitter badge 2015-02-11 15:24:26 +00:00
Junio C Hamano
9874fca712 Git 2.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v2.3.0
2015-02-05 13:23:56 -08:00
Junio C Hamano
0d1c285af2 Merge git://github.com/git-l10n/git-po
* git://github.com/git-l10n/git-po:
  l10n: ca.po: Fix trailing whitespace
2015-02-02 12:05:56 -08:00
Alex Henrie
7471cf88f5 l10n: ca.po: Fix trailing whitespace
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
2015-01-30 15:02:34 -07:00
Junio C Hamano
15598cf41b Git 2.3.0-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v2.3.0-rc2
2015-01-27 14:39:53 -08:00
Junio C Hamano
ff76d36b35 Merge git://github.com/git-l10n/git-po
* git://github.com/git-l10n/git-po:
  l10n: de.po: correct singular form
  l10n: de.po: translate "leave behind" correctly
  l10n: de.po: fix typo
  l10n: ca.po: update translation
2015-01-27 11:01:05 -08:00