Commit Graph

45200 Commits

Author SHA1 Message Date
Karsten Blees
d494119bb3 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>
2014-05-15 09:42:48 +02:00
Pat Thoyts
502f0978a7 t4210: skip command-line encoding tests on mingw
On Windows the application command line is provided as unicode and in
mingw-git we convert that to utf-8. So these tests that require a iso-8859-1
input are being subverted by the encoding transformations we perform and
should be skipped.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2014-05-15 09:42:47 +02:00
Pat Thoyts
4c5a9912f3 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>
2014-05-15 09:42:46 +02:00
Johannes Schindelin
34df2f8a2e 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>
2014-05-15 09:42:45 +02:00
Johannes Schindelin
ccc1df03f6 t1050: Fix invalid call to dd(1)
This is a companion patch to fce52b4(t4012: Fix invalid call to dd(1)).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-05-15 09:42:44 +02:00
Karsten Blees
8f8c8eeb1d MinGW: disable legacy encoding tests
On Windows, all native APIs are Unicode-based. It is impossible to pass
legacy encoded byte arrays to a process via command line or environment
variables. Disable the tests that try to do so.

In t3901, most tests still work if we don't mess up the repository encoding
in setup, so don't switch to ISO-8859-1 on MinGW.

Note that i18n tests that do their encoding tricks via encoded files (such
as t3900) are not affected by this.

Signed-off-by: Karsten Blees <blees@dcon.de>
2014-05-15 09:42:43 +02:00
Sverre Rabbelier
abc791a469 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>
2014-05-15 09:42:42 +02:00
Pat Thoyts
3a27fd7d03 t3102: Windows filesystems may not use a literal asterisk in filenames.
Exclude these tests when using MINGW.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2014-05-15 09:42:41 +02:00
Johannes Schindelin
b471db6e6d MinGW: Skip test redirecting to fd 4
... because that does not work in MinGW.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-05-15 09:42:40 +02:00
Johannes Schindelin
3f6b0ea2b3 Handle new t1501 test case properly with MinGW
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-05-15 09:42:39 +02:00
Heiko Voigt
06f6453038 work around misdetection of stdin attached to a tty
Git on Windows was made aware of the fact that sometimes a file may be
used by another process and so an operation may fail but the user might
be able to fix it and is asking for confirmation whether it should
retry.

This is implemented in a way that git only asks in case stdin and stderr
are attached to a tty. Unfortunately this seems to be misdetected
sometimes causing the testsuite to hang when git is waiting for a user
answer.

This patch works around the situation.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
2014-05-15 09:42:38 +02:00
Stepan Kasal
94696668a7 Start the merging-rebase to v1.9.3
This commit starts the rebase of 4e4b3c7 to 3d9867a
2014-05-15 09:30:47 +02:00
Sebastian Schuberth
70d7fea57e Merge pull request #181 from kasal/tests-no-posix
Revert "test: fix t7001 cp to use POSIX options"
2014-05-14 12:42:53 +02:00
Stepan Kasal
d928d330aa 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).
2014-05-14 11:18:12 +02:00
Jeff King
12949d047d config.c: mark die_bad_number as NORETURN
This can help avoid -Wuninitialized false positives in
git_config_int and git_config_ulong, as the compiler now
knows that we do not return "ret" if we hit the error
codepath.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-10 17:13:53 -05:00
Johannes Schindelin
9860bbb4ed Merge remote-tracking branch 't-b/sideband-bug'
This will allow us to work around the push issues pointed out in
https://github.com/msysgit/git/issues/101.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-05-10 17:13:50 -05:00
Thomas Braun
b6e7fcf533 Config option to disable side-band-64k for transport
Since commit 0c499ea60f the send-pack builtin uses the side-band-64k
capability if advertised by the server.

Unfortunately this breaks pushing over the dump git protocol if used
over a network connection.

The detailed reasons for this breakage are (by courtesy of Jeff Preshing,
quoted from ttps://groups.google.com/d/msg/msysgit/at8D7J-h7mw/eaLujILGUWoJ):
----------------------------------------------------------------------------
MinGW wraps Windows sockets in CRT file descriptors in order to mimic the
functionality of POSIX sockets. This causes msvcrt.dll to treat sockets as
Installable File System (IFS) handles, calling ReadFile, WriteFile,
DuplicateHandle and CloseHandle on them. This approach works well in simple
cases on recent versions of Windows, but does not support all usage patterns.
In particular, using this approach, any attempt to read & write concurrently
on the same socket (from one or more processes) will deadlock in a scenario
where the read waits for a response from the server which is only invoked after
the write. This is what send_pack currently attempts to do in the use_sideband
codepath.
----------------------------------------------------------------------------

The new config option "sendpack.sideband" allows to override the side-band-64k
capability of the server, and thus makes the dump git protocol work.

Other transportation methods like ssh and http/https still benefit from
the sideband channel, therefore the default value of "sendpack.sideband"
is still true.

Signed-off-by: Thomas Braun <thomas.braun@byte-physics.de>
2014-05-10 17:13:50 -05:00
Erik Faye-Lund
db40d884d0 Makefile: do not depend on curl-config
MinGW builds of cURL does not ship with curl-config unless built
with the autoconf based build system, which is not the practice
recommended by the documentation. MsysGit has had issues with
binaries of that sort, so it has switched away from autoconf-based
cURL-builds.

Unfortunately, broke pushing over WebDAV on Windows, because
http-push.c depends on cURL's multi-threaded API, which we could
not determine the presence of any more.

Since troublesome curl-versions are ancient, and not even present
in RedHat 5, let's just assume cURL is capable instead of doing a
non-robust check.

Instead, add a check for curl_multi_init to our configure-script,
for those on ancient system. They probably already need to do the
configure-dance anyway.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
2014-05-10 17:13:49 -05:00
Johannes Schindelin
af30131ce0 Merge pull request #122 from kblees/kb/long-paths-v2
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-05-10 17:13:49 -05:00
Johannes Schindelin
231f53802f Merge remote-tracking branch 'kblees/kb/fscache-v4-tentative-1.8.5' into thicket-1.8.5.2 2014-05-10 17:13:49 -05:00
Johannes Schindelin
2588ee01ea Merge branch 'kb/hashmap-v5-minimal' into kb/fscache-v4-t1.8.5 2014-05-10 17:13:49 -05:00
Johannes Schindelin
0853bed367 Merge branch 'tag-contains'
This topic branch addresses out-of-memory errors in particular on
Windows, where the default stack space is not very large.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-05-10 16:57:03 -05:00
Johannes Schindelin
58af5a8889 Merge pull request #126 from RomanBelinsky/master
fix date parsing error:  Update SVN.pm
2014-05-10 16:57:02 -05:00
Johannes Schindelin
8947aba21a Merge pull request #115 from msysgit/tip4commit
Mention tip4commit
2014-05-10 16:57:02 -05:00
Johannes Schindelin
d774bfc142 Merge 'poll-busy-wait' into HEAD 2014-05-10 16:57:02 -05:00
Johannes Schindelin
43e098b1b2 Merge 'normalize-win-paths' into HEAD 2014-05-10 16:57:02 -05:00
Johannes Schindelin
8f9a5f39f3 Merge 'msvc-link-crt' into HEAD 2014-05-10 16:57:02 -05:00
Johannes Schindelin
a02dd25e70 Merge 'install-wincred' into HEAD 2014-05-10 16:57:02 -05:00
Johannes Schindelin
618f8140c9 Merge 'fix-is-exe' into HEAD 2014-05-10 16:57:01 -05:00
Johannes Schindelin
4af426c1e5 Merge 'fix-externals' into HEAD 2014-05-10 16:57:01 -05:00
Johannes Schindelin
e598900a99 Merge 'stash-reflog' into HEAD 2014-05-10 16:57:01 -05:00
Johannes Schindelin
7abda7a425 Merge 'http-msys-paths' into HEAD 2014-05-10 16:57:01 -05:00
Johannes Schindelin
b7593f867f 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>
2014-05-10 16:57:01 -05:00
Johannes Schindelin
acdd2fc2d3 Merge 'win-tests-fixes' into HEAD 2014-05-10 16:57:01 -05:00
Johannes Schindelin
cbdee028b8 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>
2014-05-10 16:57:00 -05:00
Johannes Schindelin
5a9b30853b Merge 'grep-fixes' into HEAD 2014-05-10 16:57:00 -05:00
Johannes Schindelin
5322eac747 Merge 'pull-rebase-interactive' into HEAD 2014-05-10 16:57:00 -05:00
Johannes Schindelin
ab62c69232 Merge 'send-email' into HEAD 2014-05-10 16:57:00 -05:00
Johannes Schindelin
2398365930 Merge 'jberezanski/wincred-sso-r2' into HEAD 2014-05-10 16:57:00 -05:00
Johannes Schindelin
66353333a0 Merge 'gitweb-syntax' into HEAD 2014-05-10 16:56:59 -05:00
Johannes Schindelin
48e63552e6 Merge 'gitk' into HEAD 2014-05-10 16:56:59 -05:00
Johannes Schindelin
790f423a13 Merge 'git-gui' into HEAD 2014-05-10 16:56:59 -05:00
Johannes Schindelin
9a1e8b50f4 Merge 'deny-current-branch' into HEAD 2014-05-10 16:56:59 -05:00
Johannes Schindelin
7536fcf23d Merge 'criss-cross-merge' into HEAD 2014-05-10 16:56:59 -05:00
Johannes Schindelin
be6b605193 Merge 'am-submodules' into HEAD 2014-05-10 16:56:59 -05:00
Johannes Schindelin
9485bf31d5 Merge 'unc' into HEAD 2014-05-10 16:56:58 -05:00
Johannes Schindelin
a565692e8c Merge 'home' into HEAD 2014-05-10 16:56:58 -05:00
Johannes Schindelin
16180e48a2 Merge 'hide-dotgit' into HEAD 2014-05-10 16:56:58 -05:00
Johannes Schindelin
547db2e8c8 Merge 'unicode' into HEAD 2014-05-10 16:56:58 -05:00
Karsten Blees
104d4e8941 Win32: support long paths
Windows paths are typically limited to MAX_PATH = 260 characters, even
though the underlying NTFS file system supports paths up to 32,767 chars.
This limitation is also evident in Windows Explorer, cmd.exe and many
other applications (including IDEs).

Particularly annoying is that most Windows APIs return bogus error codes
if a relative path only barely exceeds MAX_PATH in conjunction with the
current directory, e.g. ERROR_PATH_NOT_FOUND / ENOENT instead of the
infinitely more helpful ERROR_FILENAME_EXCED_RANGE / ENAMETOOLONG.

Many Windows wide char APIs support longer than MAX_PATH paths through the
file namespace prefix ('\\?\' or '\\?\UNC\') followed by an absolute path.
Notable exceptions include functions dealing with executables and the
current directory (CreateProcess, LoadLibrary, Get/SetCurrentDirectory) as
well as the entire shell API (ShellExecute, SHGetSpecialFolderPath...).

Introduce a handle_long_path function to check the length of a specified
path properly (and fail with ENAMETOOLONG), and to optionally expand long
paths using the '\\?\' file namespace prefix. Short paths will not be
modified, so we don't need to worry about device names (NUL, CON, AUX).

Contrary to MSDN docs, the GetFullPathNameW function doesn't seem to be
limited to MAX_PATH (at least not on Win7), so we can use it to do the
heavy lifting of the conversion (translate '/' to '\', eliminate '.' and
'..', and make an absolute path).

Add long path error checking to xutftowcs_path for APIs with hard MAX_PATH
limit.

Add a new MAX_LONG_PATH constant and xutftowcs_long_path function for APIs
that support long paths.

While improved error checking is always active, long paths support must be
explicitly enabled via 'core.longpaths' option. This is to prevent end
users to shoot themselves in the foot by checking out files that Windows
Explorer, cmd/bash or their favorite IDE cannot handle.

Thanks-to: Martin W. Kirst <maki@bitkings.de>
Thanks-to: Doug Kelly <dougk.ff7@gmail.com>
Signed-off-by: Karsten Blees <blees@dcon.de>
2014-05-10 16:56:57 -05:00