Commit Graph

44777 Commits

Author SHA1 Message Date
Johannes Schindelin
616c7ba9be Merge 'win-tests-fixes' into HEAD 2014-04-10 13:53:43 -05:00
Johannes Schindelin
85efa6f012 Merge 'grep-fixes' into HEAD 2014-04-10 13:53:43 -05:00
Johannes Schindelin
98cc090b7d Merge 'pull-rebase-interactive' into HEAD 2014-04-10 13:53:43 -05:00
Johannes Schindelin
94899e014a Merge 'send-email' into HEAD 2014-04-10 13:53:43 -05:00
Johannes Schindelin
7051c657c4 Merge 'jberezanski/wincred-sso-r2' into HEAD 2014-04-10 13:53:42 -05:00
Johannes Schindelin
d5fe20671a Merge 'gitweb-syntax' into HEAD 2014-04-10 13:53:42 -05:00
Johannes Schindelin
7e977b24e8 Merge 'gitk' into HEAD 2014-04-10 13:53:42 -05:00
Johannes Schindelin
2581b787a1 Merge 'git-gui' into HEAD 2014-04-10 13:53:42 -05:00
Johannes Schindelin
d10e8eccd6 Merge 'deny-current-branch' into HEAD 2014-04-10 13:53:42 -05:00
Johannes Schindelin
c808197015 Merge 'criss-cross-merge' into HEAD 2014-04-10 13:53:41 -05:00
Johannes Schindelin
dbda31249f Merge 'am-submodules' into HEAD 2014-04-10 13:53:41 -05:00
Johannes Schindelin
063e2dbf79 Merge 'unc' into HEAD 2014-04-10 13:53:41 -05:00
Johannes Schindelin
f4a12d6d73 Merge 'home' into HEAD 2014-04-10 13:53:41 -05:00
Johannes Schindelin
37f6f9eafc Merge 'hide-dotgit' into HEAD 2014-04-10 13:53:41 -05:00
Johannes Schindelin
58846d4909 Merge 'unicode' into HEAD 2014-04-10 13:53:41 -05:00
Johannes Schindelin
da5160ac0b Disable t0110's high-bit test on Windows
The bash Git for Windows uses (i.e. the MSys bash) cannot pass
command-line arguments with high bits set verbatim to non-MSys programs,
but instead converts those characters with high bits set to their hex
representation.

For example, when running

	strings "$(echo -e '\x80')"

(where strings.exe is a MinGW program, not an MSys one) it will complain
about not finding the file called "80".

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-04-10 13:53:32 -05:00
Brice Lambson
955e43dfa8 MinGW: Update tests to handle a native eol of crlf
Some of the tests were written with the assumption that the native eol would always be lf. After defining NATIVE_CRLF on MinGW, these tests began failing. This change will update the tests to also handle a native eol of crlf.

Signed-off-by: Brice Lambson <bricelam@live.com>
2014-04-10 13:53:32 -05:00
Pat Thoyts
9f79ea3b0e Push the NATIVE_CRLF Makefile variable to C and added a test for native.
Commit 95f31e9a correctly points out that the NATIVE_CRLF setting is
incorrectly set on Mingw git. However, the Makefile variable is not
propagated to the C preprocessor and results in no change. This patch
pushes the definition to the C code and adds a test to validate that
when core.eol as native is crlf, we actually normalize text files to this
line ending convention when core.autocrlf is false.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2014-04-10 13:53:32 -05:00
Pat Thoyts
9da68ecd8e t9902: mingw-specific fix for gitfile link files
The path in a .git platform independent link file needs to be absolute
and under mingw we need it to be a windows type path, not a unix style
path so it should start with a drive letter and not a /.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2014-04-10 13:53:30 -05:00
Karsten Blees
0b45d85e80 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-04-10 13:53:30 -05:00
Pat Thoyts
701cc0b0e4 t4041: ensure the utf-8 encoded string really gets stored as utf-8.
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2014-04-10 13:53:30 -05:00
Pat Thoyts
4de45ba540 t4205: use a file to ensure the encoding is as desired with msysgit
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2014-04-10 13:53:30 -05:00
Pat Thoyts
6d5ddafd37 t6006: be explicit about the encoding of test strings for msysgit
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2014-04-10 13:53:29 -05:00
Pat Thoyts
b5dde949bb t7102: do not assume the system encoding is utf-8
The commit_msg function has an assumption that the string is being output
as utf-8. On Windows this is not true so always convert from the system
encoding to the desired encoding.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2014-04-10 13:53:29 -05:00
Pat Thoyts
5c2060439b 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-04-10 13:53:29 -05:00
Pat Thoyts
d813621f8d t7800: a few tests should ignore crlf in checking the result.
Those tests that generate files using echo can expect crlf issues when run
under windows. For such cases we use 'test_cmp_text'.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2014-04-10 13:53:29 -05:00
Pat Thoyts
b530e4bf39 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-04-10 13:53:29 -05:00
Johannes Schindelin
4a70c2b0e3 Fix t3404 for Windows
The usual problem: CR/LF...

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-04-10 13:53:29 -05:00
Pat Thoyts
b15d6dc168 t1306: perform file comparisons using text mode for Windows support
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2014-04-10 13:53:29 -05:00
Johannes Schindelin
a3bcb59e99 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-04-10 13:53:29 -05:00
Johannes Schindelin
d917934b58 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-04-10 13:53:28 -05:00
Karsten Blees
58ecd42a03 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-04-10 13:53:28 -05:00
Johannes Schindelin
8d0429ca41 Introduce and use test_cmp_text
On Windows, we suffer from frequently leaked DOS line endings. Let's
ignore them.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-04-10 13:53:28 -05:00
Johannes Schindelin
c3f9224acf 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>
2014-04-10 13:53:28 -05:00
Sverre Rabbelier
acd984dfa0 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-04-10 13:53:28 -05:00
Johannes Schindelin
35a078cad5 t030[02]: work around CR/LF issue
It is the old shell-script issue we had in a few other tests already.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-04-10 13:53:28 -05:00
Pat Thoyts
539c9cd3be t5407: Fix line-ending dependency in post-rewrite.args
On msysGit creating the post-rewrite.args file using 'echo' has different
line endings from the expected comparison. Using perl normalizes the line
endings for each generated file.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2014-04-10 13:53:28 -05:00
Pat Thoyts
5bf667bd87 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-04-10 13:53:27 -05:00
Johannes Schindelin
b351af80ed MinGW: Skip test redirecting to fd 4
... because that does not work in MinGW.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-04-10 13:53:27 -05:00
Johannes Schindelin
a30e6f8fdd Handle new t1501 test case properly with MinGW
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-04-10 13:53:27 -05:00
Heiko Voigt
de2638243e 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-04-10 13:53:27 -05:00
Johannes Schindelin
c2a279c2c0 Work around funny CR issue
This is really a problem with shell scripts being called on msysGit,
but there are more important bugs to fix for the moment.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-04-10 13:53:27 -05:00
Sebastian Schuberth
bf7ca98d53 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>
2014-04-10 13:53:27 -05:00
Johannes Schindelin
5edf3c9e09 grep -I: do not bother to read known-binary files
Incidentally, this makes grep -I respect the "binary" attribute (actually,
the "-text" attribute, but "binary" implies that).

Since the attributes are not thread-safe, we now need to switch off
threading if -I was passed.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-04-10 13:53:26 -05:00
Sebastian Schuberth
acf70effc3 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).
2014-04-10 13:53:26 -05:00
Johannes Schindelin
a872d83f81 git grep -O -i: if the pager is 'less', pass the '-i' option
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-04-10 13:53:26 -05:00
Johannes Schindelin
ead2089e6c Teach 'git remote' that the config var branch.*.rebase can be 'interactive'
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-04-10 13:53:25 -05:00
Johannes Schindelin
a4121765ff Handle the branch.<name>.rebase value 'interactive'
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-04-10 13:53:25 -05:00
Johannes Schindelin
7442d2df29 Teach 'git pull' to handle --rebase=interactive
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-04-10 13:53:25 -05:00
bert Dvornik
03d14ef2e7 send-email: handle Windows paths for display just like we do for processing
In git-send-email.perl, here are two checks to determine if
$smtp_server is an absolute path (so it'll be treated as a mailer) or
not (so it'll be treated as a hostname).  The one that handles actual
mail processing has been taught to recognize Windows pathnames by
commit 33b2e81f.

The other check is just to tell the user what happened, so it's far
less important, but the current state is that we will still claim to
the user that c:/foo/bar is a server. =)  This makes the second check
consistent with the first.

Signed-off-by: bert Dvornik <dvornik+git@gmail.com>
2014-04-10 13:53:24 -05:00