Commit Graph

45317 Commits

Author SHA1 Message Date
Stepan Kasal
ca1a6ed229 Merge 'fix-externals' into HEAD 2014-05-15 09:44:14 +02:00
Stepan Kasal
8673fdf95d Merge 'stash-reflog' into HEAD 2014-05-15 09:44:12 +02:00
Stepan Kasal
4a2c3f4325 Merge 'http-msys-paths' into HEAD 2014-05-15 09:44:11 +02:00
Stepan Kasal
96af4a2fa0 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-15 09:44:10 +02:00
Stepan Kasal
1b38b9a4a1 Merge 'win-tests-fixes' into HEAD 2014-05-15 09:44:09 +02:00
Stepan Kasal
78abb544e6 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-15 09:44:08 +02:00
Stepan Kasal
cfd98c3117 Merge 'pull-rebase-interactive' into HEAD 2014-05-15 09:44:06 +02:00
Stepan Kasal
34b69048eb Merge 'send-email' into HEAD 2014-05-15 09:44:05 +02:00
Stepan Kasal
eb1913f3fb Merge 'jberezanski/wincred-sso-r2' into HEAD 2014-05-15 09:44:04 +02:00
Stepan Kasal
c8cbdf0ed4 Merge 'gitweb-syntax' into HEAD 2014-05-15 09:44:03 +02:00
Stepan Kasal
c5331c411e Merge 'gitk' into HEAD 2014-05-15 09:44:02 +02:00
Stepan Kasal
36c14e5ae8 Merge 'git-gui' into HEAD 2014-05-15 09:44:00 +02:00
Stepan Kasal
496751e720 Merge 'deny-current-branch' into HEAD 2014-05-15 09:43:59 +02:00
Stepan Kasal
82f25bf2fe Merge 'criss-cross-merge' into HEAD 2014-05-15 09:43:58 +02:00
Stepan Kasal
cb2e411808 Merge 'am-submodules' into HEAD 2014-05-15 09:43:57 +02:00
Stepan Kasal
926a92b51c Merge 'unc' into HEAD 2014-05-15 09:43:56 +02:00
Stepan Kasal
a5be7ee70d Merge 'home' into HEAD 2014-05-15 09:43:54 +02:00
Stepan Kasal
26b8bc9011 Merge 'hide-dotgit' into HEAD 2014-05-15 09:43:53 +02:00
Stepan Kasal
c53225848c Merge 'unicode' into HEAD 2014-05-15 09:43:52 +02:00
Stepan Kasal
da26b614dc Merge 'refs/rewritten/junio/notyet' into HEAD 2014-05-15 09:43:51 +02:00
Stepan Kasal
9fc185502f Merge 'refs/rewritten/junio/pu' into HEAD 2014-05-15 09:43:50 +02:00
Stepan Kasal
746ee21ba5 Merge 'refs/rewritten/junio/next' into HEAD 2014-05-15 09:43:49 +02:00
Stepan Kasal
6978d61f77 Merge 'refs/rewritten/junio/master' into HEAD 2014-05-15 09:43:47 +02:00
Adam Roben
e959849565 Make non-.exe externals work again
7ebac8cb94 made launching of .exe
externals work when installed in Unicode paths. But it broke launching
of non-.exe externals, no matter where they were installed. We now
correctly maintain the UTF-8 and UTF-16 paths in tandem in lookup_prog.

This fixes t5526, among others.

Signed-off-by: Adam Roben <adam@roben.org>
2014-05-15 09:43:09 +02:00
Adam Roben
fa5d5a30ae Fix launching of externals from Unicode paths
If Git were installed in a path containing non-ASCII characters,
commands such as git-am and git-submodule, which are implemented as
externals, would fail to launch with the following error:

> fatal: 'am' appears to be a git command, but we were not
> able to execute it. Maybe git-am is broken?

This was due to lookup_prog not being Unicode-aware. It was somehow
missed in 2ee5a1a14a.

Note that the only problem in this function was calling
GetFileAttributes instead of GetFileAttributesW. The calls to access()
were fine because access() is a macro which resolves to mingw_access,
which already handles Unicode correctly. But I changed lookup_prog to
use _waccess directly so that we only convert the path to UTF-16 once.

Signed-off-by: Adam Roben <adam@roben.org>
2014-05-15 09:43:09 +02:00
Evgeny Pashkin
6dd942bc03 Fixed wrong path delimiter in exe finding
On Windows XP3 in git bash
git clone git@github.com:octocat/Spoon-Knife.git
cd Spoon-Knife
git gui
menu Remote\Fetch from\origin
error: cannot spawn git: No such file or directory
error: could not run rev-list

if u run
git fetch --all
it worked normal in git bash or gitgui tools

In second version CreateProcess get 'C:\Git\libexec\git-core/git.exe' in
first version - C:/Git/libexec/git-core/git.exe and not executes (unix
slashes)

after fixing C:\Git\libexec\git-core\git.exe or
C:/Git/libexec/git-core\git.exe it works normal

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-05-15 09:43:08 +02:00
Johannes Schindelin
2280b8fa88 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-15 09:43:04 +02:00
Johannes Schindelin
2e2c9322cf 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-15 09:43:01 +02:00
Johannes Schindelin
68cfd0b605 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-15 09:42:58 +02:00
Sverre Rabbelier
23d01f5d42 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-15 09:42:57 +02:00
Sverre Rabbelier
54beb020fa transport-helper: add trailing --
[PT: ensure we add an additional element to the argv array]
2014-05-15 09:42:55 +02:00
Johannes Schindelin
9da403f706 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-15 09:42:54 +02:00
Pat Thoyts
dd053370cb 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-15 09:42:51 +02:00
Johannes Schindelin
61a152a3ad 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-15 09:42:50 +02:00
Pat Thoyts
6a875fcf8f 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-15 09:42:49 +02:00
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
Brice Lambson
f94a9caa29 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-15 09:42:35 +02:00
Pat Thoyts
7ff641158c 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-15 09:42:34 +02:00
Johannes Schindelin
4407414ed9 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-15 09:42:33 +02:00
Sebastian Schuberth
9e5973abdc 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-15 09:42:32 +02:00