Commit Graph

45147 Commits

Author SHA1 Message Date
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
Johannes Schindelin
c34e9ff1df git stash: make sure that .git/logs/refs/ exists
If the user has not activated reflogs, or if nothing has been recorded
yet (as is the case directly after cloning), said directory may not
exist yet.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-05-10 16:56:44 -05:00
Johannes Schindelin
57c8e5cd88 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>
2014-05-10 16:56:44 -05:00
Johannes Schindelin
fe9aab204b Always auto-gc after calling a fast-import transport
After importing anything with fast-import, we should always let the
garbage collector do its job, since the objects are written to disk
inefficiently.

This brings down an initial import of http://selenic.com/hg from about
230 megabytes to about 14.

In the future, we may want to make this configurable on a per-remote
basis, or maybe teach fast-import about it in the first place.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-05-10 16:56:44 -05:00
Sverre Rabbelier
11b6018de6 remote-helper: check helper status after import/export
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
2014-05-10 16:56:44 -05:00
Pat Thoyts
ef4a733c08 tests: do not pass iso8859-1 encoded parameter
git commit -m with some iso8859-1 encoded stuff is doomed to fail in MinGW,
because Windows don't let you pass encoded bytes to a process (CreateProcessW
always takes a UTF-16LE encoded string).

It is safe to pass the iso8859-1 message using a file or a pipe.

Thanks-to: Karsten Blees <blees@dcon.de>
Author: Stepan Kasal <kasal@ucw.cz>
2014-05-10 16:56:43 -05:00
Sverre Rabbelier
5e40ceb57c transport-helper: add trailing --
[PT: ensure we add an additional element to the argv array]
2014-05-10 16:56:43 -05:00
Johannes Schindelin
986d2d4ee6 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-05-10 16:56:43 -05:00
Johannes Schindelin
12480d0026 fast-export: do not refer to non-existing marks
When calling `git fast-export a..a b` when a and b refer to the same
commit, nothing would be exported, and an incorrect reset line would
be printed for b ('from :0').

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
2014-05-10 16:56:43 -05:00
Pat Thoyts
a0c3e15ddd 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-05-10 16:56:43 -05:00
Karsten Blees
92e324a74e 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-10 16:56:42 -05:00
Pat Thoyts
2c6d70201d 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-10 16:56:42 -05:00
Pat Thoyts
8d5bf4118f 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-10 16:56:42 -05:00
Johannes Schindelin
43660bc455 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-10 16:56:42 -05:00
Johannes Schindelin
7bfdba4a86 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-10 16:56:42 -05:00
Karsten Blees
44baaf98fc 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-10 16:56:42 -05:00
Sverre Rabbelier
a9813b6c1e 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-10 16:56:42 -05:00
Pat Thoyts
bfc7b917c0 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-10 16:56:42 -05:00
Brice Lambson
be5eaf8252 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-05-10 16:56:41 -05:00
Johannes Schindelin
b9c78b0265 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-10 16:56:41 -05:00
Johannes Schindelin
86145eba4c Handle new t1501 test case properly with MinGW
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-05-10 16:56:41 -05:00
Heiko Voigt
73fa916634 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-10 16:56:41 -05:00
Johannes Schindelin
31f5ab1253 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-05-10 16:56:40 -05:00
Pat Thoyts
221b3c5701 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>
Signed-off-by: Stepan Kasal <kasal@ucw.cz>
2014-05-10 16:56:40 -05:00
Johannes Schindelin
80d7b9116a git grep -O -i: if the pager is 'less', pass the '-i' option
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-05-10 16:56:40 -05:00
Johannes Schindelin
6cdf307d79 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-05-10 16:56:40 -05:00
Sebastian Schuberth
9be964caf4 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-05-10 16:56:40 -05:00
Sebastian Schuberth
bbfce9ba3d 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-05-10 16:56:40 -05:00
Johannes Schindelin
11cce70912 Teach 'git remote' that the config var branch.*.rebase can be 'interactive'
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-05-10 16:56:39 -05:00
Johannes Schindelin
b29f2150a0 Handle the branch.<name>.rebase value 'interactive'
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-05-10 16:56:39 -05:00
Johannes Schindelin
31693ebf3e Teach 'git pull' to handle --rebase=interactive
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-05-10 16:56:39 -05:00
bert Dvornik
31180f8545 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-05-10 16:56:38 -05:00