Commit Graph

48971 Commits

Author SHA1 Message Date
Johannes Schindelin
49fb2af240 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>
2015-03-06 18:13:39 +01:00
Johannes Schindelin
7f4531f7f6 Merge pull request #24 from gitter-badger/gitter-badge
Add a Gitter chat badge to README.md
2015-03-06 18:13:39 +01:00
Johannes Schindelin
fde7d7b95b Merge pull request #14 from dscho/readme
Add a README.md for GitHub goodness.
2015-03-06 18:13:39 +01:00
Johannes Schindelin
d2540b8582 Merge 'fix-is-exe' into HEAD 2015-03-06 18:13:39 +01:00
Johannes Schindelin
6c8009273d Merge 'fix-externals' into HEAD 2015-03-06 18:13:39 +01:00
Johannes Schindelin
3ac4881b7e 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>
2015-03-06 18:13:39 +01:00
Johannes Schindelin
0a0ef263ec Merge 'win-tests-fixes' into HEAD 2015-03-06 18:13:38 +01:00
Johannes Schindelin
4c03b241d7 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>
2015-03-06 18:13:38 +01:00
Johannes Schindelin
a852a69043 Merge pull request #26 from dscho/msys2
Fixes required to build Git for Windows with MSys2
2015-03-06 18:13:38 +01:00
Johannes Schindelin
124dadd18e Merge 'pull-rebase-interactive' into HEAD 2015-03-06 18:13:38 +01:00
Johannes Schindelin
ce9184833b Merge 'jberezanski/wincred-sso-r2' into HEAD 2015-03-06 18:13:38 +01:00
Johannes Schindelin
4b7d5dc622 Merge 'gitweb-syntax' into HEAD 2015-03-06 18:13:38 +01:00
Johannes Schindelin
c3510adae0 Merge 'gitk' into HEAD 2015-03-06 18:13:38 +01:00
Johannes Schindelin
2df74a500a Merge 'git-gui' into HEAD 2015-03-06 18:13:38 +01:00
Johannes Schindelin
c2565b9b8a Merge 'criss-cross-merge' into HEAD 2015-03-06 18:13:37 +01:00
Johannes Schindelin
d69ba5f3be Merge 'am-submodules' into HEAD 2015-03-06 18:13:37 +01:00
Johannes Schindelin
5eeb39d0d2 Merge 'hide-dotgit' into HEAD 2015-03-06 18:13:37 +01:00
Johannes Schindelin
b8f8af0ad0 Merge 'unicode' into HEAD 2015-03-06 18:13:37 +01:00
Johannes Schindelin
a0d8291fe6 Merge 'refs/rewritten/junio/notyet' into HEAD 2015-03-06 18:13:37 +01:00
Thomas Braun
11c75dbe87 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>
2015-03-06 18:11:27 +01:00
The Gitter Badger
ee7e1619d9 Added Gitter badge 2015-03-06 18:11:27 +01:00
Johannes Schindelin
9b3cc26114 Add a README.md
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-06 18:11:26 +01:00
Heiko Voigt
5de0eac15a help: correct behavior for is_executable on Windows
The previous implementation said that the filesystem information on
Windows is not reliable to determine whether a file is executable.
To find gather this information it was peeking into the first two bytes
of a file to see whether it looks executable.
Apart from the fact that on Windows executables are usually defined as
such by their extension it lead to slow opening of help file in some
situations.

When you have virus scanner running calling open on an executable file
is a potentially expensive operation. See the following measurements (in
seconds) for example.

With virus scanner running (coldcache):

$ ./a.exe /libexec/git-core/
before open (git-add.exe): 0.000000
after open (git-add.exe): 0.412873
before open (git-annotate.exe): 0.000175
after open (git-annotate.exe): 0.397925
before open (git-apply.exe): 0.000243
after open (git-apply.exe): 0.399996
before open (git-archive.exe): 0.000147
after open (git-archive.exe): 0.397783
before open (git-bisect--helper.exe): 0.000160
after open (git-bisect--helper.exe): 0.397700
before open (git-blame.exe): 0.000160
after open (git-blame.exe): 0.399136
...

With virus scanner running (hotcache):

$ ./a.exe /libexec/git-core/
before open (git-add.exe): 0.000000
after open (git-add.exe): 0.000325
before open (git-annotate.exe): 0.000229
after open (git-annotate.exe): 0.000177
before open (git-apply.exe): 0.000167
after open (git-apply.exe): 0.000150
before open (git-archive.exe): 0.000154
after open (git-archive.exe): 0.000156
before open (git-bisect--helper.exe): 0.000132
after open (git-bisect--helper.exe): 0.000180
before open (git-blame.exe): 0.000718
after open (git-blame.exe): 0.000724
...

This test did just list the given directory and open() each file in it.

With this patch I get:

$ time git help git
Launching default browser to display HTML ...

real    0m8.723s
user    0m0.000s
sys     0m0.000s

and without

$ time git help git
Launching default browser to display HTML ...

real    1m37.734s
user    0m0.000s
sys     0m0.031s

both tests with cold cache and giving the machine some time to settle
down after restart.

Signed-off-by: Heiko Voigt <heiko.voigt@mahr.de>
2015-03-06 18:11:26 +01:00
Adam Roben
dc36af7858 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>
2015-03-06 18:11:26 +01:00
Adam Roben
94a54c6610 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>
2015-03-06 18:11:26 +01:00
Evgeny Pashkin
3a7156fa3a 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>
2015-03-06 18:11:26 +01:00
Johannes Schindelin
7c4098f10e 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>
2015-03-06 18:11:25 +01:00
Sverre Rabbelier
068d931348 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>
2015-03-06 18:11:25 +01:00
Sverre Rabbelier
d6b2039dfc transport-helper: add trailing --
[PT: ensure we add an additional element to the argv array]
2015-03-06 18:11:25 +01:00
Johannes Schindelin
c1d3a13f51 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>
2015-03-06 18:11:25 +01:00
마누엘
07503cef3c mingw: Fix git-svn tests
There are some issues with the git-svn test cases when they are
being run on windows under a MINGW build. Some things are not
available like the changing of the execute flag of shell scripts
via the chmod command. Also there were problems with folder names
that end with a dot on windows.

Signed-off-by: 마누엘 <nalla@users.noreply.github.com>
2015-03-06 18:10:46 +01:00
Johannes Schindelin
88a8f5d9a5 Skip t9020 with MSys2
POSIX-to-Windows path mangling would make it fail.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-06 18:10:46 +01:00
Johannes Schindelin
6a4c0a6b3b Skip t0204 for MinGW Git
As per https://msdn.microsoft.com/en-us/library/x99tb11d.aspx:

	The set of available locale names, languages, country/region
	codes, and code pages includes all those supported by the Windows
	NLS API except code pages that require more than two bytes per
	character, such as UTF-7 and UTF-8.

Therefore, MinGW gettext cannot cope with UTF-8 at all, because it uses
the Win32 API internally.

However, when the test asks `locale -a` it reports that is_US.utf8 is
available, because that `locale` is actually an *MSys2* program (and MSys2
can cope with UTF-8 alright).

Let's just skip this test for MinGW Git altogether.

Helped-by: 마누엘 <nalla@users.noreply.github.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-06 18:10:46 +01:00
Johannes Schindelin
1fc024f57b t0200: disable more tests with MSys2 that rely on locale.exe
There is a MinGW gettext.exe, but still no MinGW locale.exe. Instead the
MSys2 locale.exe kicks in, which corresponds to the MSys2 gettext.exe,
however. Therefore some assumptions of t0200 cannot be fulfilled when
running inside MSys2.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-06 18:10:46 +01:00
Johannes Schindelin
de31cc0a4b Mark t0027-auto-crlf as cheap enough for MinGW
t0027 is marked expensive, but really, for MinGW we want to run these
tests always.

Suggested by Thomas Braun.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-06 18:10:46 +01:00
Johannes Schindelin
4969c8fe2b Teach t0027 about native end-of-lines
Without this patch, t0027 expects the native end-of-lines to be a single
line feed character. On Windows, however, we set it to a carriage return
character followed by a line feed character. Thus, we have to modify
t0027 to expect different warnings depending on the end-of-line markers.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-06 18:10:46 +01:00
Thomas Braun
500535ac93 t0027: Disable test on MINGW
We can't mmap 2GB of RAM on our 32bit platform, so
just disable the test.

Signed-off-by: Thomas Braun <thomas.braun@byte-physics.de>
2015-03-06 18:10:46 +01:00
Thomas Braun
8527afd683 t1508: Be more clever than msys path substitution
A string of the form "@/abcd" is considered a file path
by the msys layer and therefore translated to a windows path.

Here the trick is to double the slashes.

The msys patch translation can be studied with the following
test program:

 #include <stdio.h>
 #include <stdlib.h>

 int main(int argc, char** argv)
 {
 unsigned int i;
 for(i=1; i < argc; i++)
 	printf("argv[%d]=%s\n",i, argv[i]);

 exit(0);
 }

Signed-off-by: Thomas Braun <thomas.braun@byte-physics.de>
2015-03-06 18:10:46 +01:00
Thomas Braun
54fd864c0e t5503: Mark flaky tests as known breakages
As non reliable tests are nasty.

Signed-off-by: Thomas Braun <thomas.braun@byte-physics.de>
2015-03-06 18:10:46 +01:00
Stepan Kasal
d0021d3348 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).
2015-03-06 18:10:46 +01:00
Stepan Kasal
f78600145a tests: turn off git-daemon tests if FIFOs are not available
Signed-off-by: Stepan Kasal <kasal@ucw.cz>
2015-03-06 18:10:46 +01:00
Karsten Blees
a8392153bb 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>
2015-03-06 18:10:46 +01:00
Johannes Schindelin
70a109d6e7 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>
2015-03-06 18:10:45 +01:00
Pat Thoyts
53c6601e43 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>
2015-03-06 18:10:45 +01:00
Sebastian Schuberth
53efcf2f59 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>
2015-03-06 18:10:45 +01:00
Johannes Schindelin
d64ca8a6e6 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>
2015-03-06 18:10:45 +01:00
Sebastian Schuberth
6530627728 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).
2015-03-06 18:10:45 +01:00
Sverre Rabbelier
cfdd636ebe 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>
2015-03-06 18:10:45 +01:00
Johannes Schindelin
2ae57dea64 Handle new t1501 test case properly with MinGW
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-03-06 18:10:45 +01:00
마누엘
3016015681 mingw: Try to delete target directory first.
When the rename function tries to move a directory it fails if the target
directory exists. It should check if it can delete the (possibly empty)
target directory and then try again to move the directory.

Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: 마누엘 <nalla@users.noreply.github.com>
2015-03-06 18:10:44 +01:00