Commit Graph

48500 Commits

Author SHA1 Message Date
Johannes Schindelin
40d26cdd7f Merge 'jberezanski/wincred-sso-r2' into HEAD 2015-02-22 20:11:21 +01:00
Johannes Schindelin
2cee499bb7 Merge 'gitweb-syntax' into HEAD 2015-02-22 20:11:21 +01:00
Johannes Schindelin
b54b864523 Merge 'gitk' into HEAD 2015-02-22 20:11:21 +01:00
Johannes Schindelin
73ba3989f8 Merge 'git-gui' into HEAD 2015-02-22 20:11:20 +01:00
Johannes Schindelin
24039072ad Merge 'criss-cross-merge' into HEAD 2015-02-22 20:11:20 +01:00
Johannes Schindelin
e5c9e9c834 Merge 'am-submodules' into HEAD 2015-02-22 20:11:19 +01:00
Johannes Schindelin
1e96358051 Merge 'hide-dotgit' into HEAD 2015-02-22 20:11:19 +01:00
Johannes Schindelin
ac7fb53ca2 Merge 'unicode' into HEAD 2015-02-22 20:11:19 +01:00
Johannes Schindelin
45fd1e002a Merge 'refs/rewritten/junio/notyet' into HEAD 2015-02-22 20:11:18 +01:00
Jakub Bereżański
847d5a957b wincred: handle empty username/password correctly
Empty (length 0) usernames and/or passwords, when saved in the Windows
Credential Manager, come back as null when reading the credential.

One use case for such empty credentials is with NTLM authentication, where
empty username and password instruct libcurl to authenticate using the
credentials of the currently logged-on user (single sign-on).

When locating the relevant credentials, make empty username match null.
When outputting the credentials, handle nulls correctly.

Signed-off-by: Jakub Bereżański <kuba@berezanscy.pl>
2015-02-22 20:02:47 +01:00
Jakub Bereżański
13febd5f28 t0302: check helper can handle empty credentials
Make sure the helper does not crash when blank username and password is
provided. If the helper can save such credentials, it should be able to
read them back.

Signed-off-by: Jakub Bereżański <kuba@berezanscy.pl>
2015-02-22 20:02:47 +01:00
Johannes Schindelin
5097c21fca gitweb (SyntaxHighlighter): interpret #l<line-number>
It is pretty convenient to refer to a line number by appending, say,
highlighter, too.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 20:02:46 +01:00
Johannes Schindelin
71e3cc55ce Only switch on the line number toggle when highlighting is activated
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 20:02:46 +01:00
Johannes Schindelin
8090a00bfd Gitweb: add support for Alex Gorbatchev's SyntaxHighlighter in Javascript
Gitweb is not exactly what you would call server-friendly, so let's
offload one more task onto the client.

To enable this, put something like this into your gitweb_config.perl:

	$feature{'syntaxhighlighter_js'}{'default'} = [{
		url => '/SyntaxHighlighter/',
		style => 'Django',
		theme => 'FadeToGrey'
	}];

and clone git://github.com/alexgorbatchev/SyntaxHighlighter into the
directory you specified via the 'url' parameter.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 20:02:45 +01:00
Johannes Schindelin
ae8441da8c Gitweb: make line number toggling work for Firefox and Safari
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 20:02:45 +01:00
Sebastian Schuberth
36c148d43d gitk: Use an external icon file on Windows
Git for Windows now ships with the new Git icon from git-scm.com. Use that
icon file if it exists instead of the old procedurally drawn one.

This patch was sent upstream but so far no decision on its inclusion was
made, so commit it to our fork.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
2015-02-22 20:02:44 +01:00
Johannes Schindelin
0dc1962c82 gitweb: Allow line number toggling with Javascript
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 20:02:44 +01:00
Chris West (Faux)
7b9267ce8b Fix another invocation of git from gitk with an overly long command-line
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
2015-02-22 20:02:43 +01:00
Johannes Schindelin
b020f458c6 Work around the command line limit on Windows
On Windows, there are dramatic problems when a command line grows
beyond PATH_MAX, which is restricted to 8191 characters on XP and
later (according to http://support.microsoft.com/kb/830473).

Work around this by just cutting off the command line at that length
(actually, at a space boundary) in the hope that only negative
refs are chucked: gitk will then do unnecessary work, but that is
still better than flashing the gitk window and exiting with exit
status 5 (which no Windows user is able to make sense of).

The first fix caused Tcl to fail to compile the regexp, see msysGit issue
427. Here is another fix without using regexp, and using a more relaxed
command line length limit to fix the original issue 387.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 20:02:43 +01:00
Johannes Schindelin
2ab8d7208d git gui: set GIT_ASKPASS=git-gui--askpass if not set yet
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 20:02:42 +01:00
Heiko Voigt
1a445ce29d git-gui: provide question helper for retry fallback on Windows
Make use of the new environment variable GIT_ASK_YESNO to support the
recently implemented fallback in case unlink, rename or rmdir fail for
files in use on Windows. The added dialog will present a yes/no question
to the the user which will currently be used by the windows compat layer
to let the user retry a failed file operation.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
2015-02-22 20:02:42 +01:00
Heiko Voigt
b0f113da5d Revert "git-gui: set GIT_DIR and GIT_WORK_TREE after setup"
This reverts commit a9fa11fe5b.
2015-02-22 20:02:42 +01:00
Johannes Sixt
608edc13c4 criss cross rename failure workaround
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 20:02:00 +01:00
Johannes Schindelin
832ead7945 git am: ignore dirty submodules
This fixes a rebase in the presence of dirty submodules. This is
orthogonal to the application of patches changing submodules.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 20:02:00 +01:00
Pat Thoyts
4786248baf mingw: add tests for the hidden attribute on the git directory
With msysGit the .git directory is supposed to be hidden, unless it is
a bare git repository. Test this.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2015-02-22 20:01:59 +01:00
Johannes Schindelin
6d99437c83 When initializing .git/, record the current setting of core.hideDotFiles
This is on Windows only, of course.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 20:01:59 +01:00
Erik Faye-Lund
620a57227b core.hidedotfiles: hide '.git' dir by default
At least for cross-platform projects, it makes sense to hide the
files starting with a dot, as this is the behavior on Unix/MacOSX.

However, at least Eclipse has problems interpreting the hidden flag
correctly, so the default is to hide only the .git/ directory.

The config setting core.hideDotFiles therefore supports not only
'true' and 'false', but also 'dotGitOnly'.

[jes: clarified the commit message, made git init respect the setting
by marking the .git/ directory only after reading the config, and added
documentation, and rebased on top of current junio/next]

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 20:01:55 +01:00
Karsten Blees
8074c02ecc Unicode file name support (gitk and git-gui)
Assumes file names in git tree objects are UTF-8 encoded.

On most unix systems, the system encoding (and thus the TCL system
encoding) will be UTF-8, so file names will be displayed correctly.

On Windows, it is impossible to set the system encoding to UTF-8. Changing
the TCL system encoding (via 'encoding system ...', e.g. in the startup
code) is explicitly discouraged by the TCL docs.

Change gitk and git-gui functions dealing with file names to always convert
from and to UTF-8.

Signed-off-by: Karsten Blees <blees@dcon.de>
2015-02-22 20:01:23 +01:00
Erik Faye-Lund
22cb223aad 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>
2015-02-22 20:01:20 +01:00
Johannes Schindelin
a7f17aa223 Start the merging-rebase to v2.3.0
This commit starts the rebase of 3fa02b8 to 42de6ed
2015-02-22 19:58:07 +01:00
dscho
ff4771bae9 Merge pull request #26 from dscho/msys2
Fixes required to build Git for Windows with MSys2
2015-02-22 20:39:24 +01:00
Johannes Schindelin
119830d2d6 MSys2: Fix t9700 assumption about directory separators
This test assumed that there are no two equivalent directory separators.
However, on Windows, the back slash and the forward slash *are*
equivalent. Let's paper over this issue by converting the backward
slashes to forward ones in the test that fails with MSys2 otherwise.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 18:57:20 +01:00
Johannes Schindelin
b528e9430a Git.pm: stop assuming that absolute paths start with a slash
This fixes t7800 with MSys2.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 18:57:19 +01:00
Johannes Schindelin
1f8add0600 mingw: Prepare the TMP environment variable for shell scripts
When shell scripts access a $TMP variable containing backslashes, they
will be mistaken for escape characters. Let's not let that happen by
converting them to forward slashes.

This fixes t7800 with MSys2.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 18:57:19 +01:00
Johannes Schindelin
5c658f4f5b Tests: optionally skip redirecting stdin/stdout/stderr
There is a really useful debugging technique developed by Sverre
Rabbelier that inserts "bash &&" somewhere in the test scripts, letting
the developer interact at given points with the current state.

Another debugging technique, used a lot by this here coder, is to run
certain executables via gdb by guarding a "gdb -args" call in
bin-wrappers/git.

Both techniques were disabled by 781f76b1(test-lib: redirect stdin of
tests).

Let's reinstate the ability to run an interactive shell by making the
redirection optional: setting the TEST_NO_REDIRECT environment variable
will skip the redirection.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 18:57:19 +01:00
Johannes Schindelin
a9b3c2b408 t5516: override MinGW-specific pwd override
This test is susceptible to MSys2's posix-to-windows path mangling; Let's
just use POSIX paths throughout and let the tests pass.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 18:57:19 +01:00
Johannes Schindelin
3153820216 fixup! t5000: Fix CRLF vs LF issue
MSys2's `tr` does not introduce any CRLFs...

This reverts commit 01a6f1b248.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 18:57:19 +01:00
Johannes Schindelin
34fc6de873 Tests (MinGW): Disable mkfifo-based tests
With MSys2, there is actually an implementation of mkfifo available. The
only problem is that it is only emulating named pipes through the MSys2
runtime; The Win32 API has no idea about named pipes, hence the Git
executable cannot access those pipes either.

The symptom is that Git fails with a '<name>: No such file or directory'
because MSys2 emulates named pipes through special-crafted '.lnk' files.

The solution is to tell the test suite explicitly that we cannot use
named pipes when we want to test a MinGW Git.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 18:57:18 +01:00
Johannes Schindelin
93dd46ccbf Tests (MinGW): Do not bother to test funny file names
MSys2 actually allows to create files or directories whose names contain
tabs, newlines or colors, even if plain Win32 API cannot access them.
As we are using an MSys2 bash to run the tests, such files or
directories are created successfully, but Git has no chance to work with
them because it is a regular Windows program, hence limited by the Win32
API.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 18:57:18 +01:00
Johannes Schindelin
fb3ca797e6 Special-case the MSYS2_TZ environment variable
With MSys2, the "TZ" environment variable gets filtered out when calling
non-MSys2 executables. The reason is that Windows' time zone handling is
substantially different from the POSIX one.

However, we just taught Git for Windows' fork of the MSys2 runtime to
pass on the timezone in a different environment variable, MSYS2_TZ for
the sole purpose of Git being able to reinterpret it correctly.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 18:57:18 +01:00
Johannes Schindelin
ad5d003251 Error out when mingw_startup() *and* NO_UNSETENV are active
The unsetenv code has no idea to update our environ_size, therefore
causing segmentation faults when environment variables are removed
without compat/mingw.c's knowing (MinGW's optimized lookup would try
to strcmp() against NULL in such a case).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 18:57:18 +01:00
Johannes Schindelin
af5bef8d6d Squash compile warning with MSys2
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 18:57:18 +01:00
Johannes Schindelin
626bfc1a0d Let's use gettext and Python with MSys2
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 18:57:17 +01:00
Johannes Schindelin
5bf9db5118 Build Python stuff with MSys2
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 18:57:17 +01:00
Johannes Schindelin
393f70f609 WIP: Support 64-bit MSys2
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 18:57:17 +01:00
Johannes Schindelin
d4fcc46ee3 Start supporting MSys2 in config.mak.uname
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 18:57:17 +01:00
Johannes Schindelin
e8cb19e5dd Do not re-define _CONSOLE_FONT_INFOEX when compiling with MSys2
MSys2 already has that structure.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 18:56:58 +01:00
Johannes Schindelin
d594d61c1a Avoid redefining S_* constants
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 18:56:13 +01:00
Johannes Schindelin
8e8c7416c0 Port header fixes from MSys2
MSys2' Git build script has some changes we should put into Git for
Windows' source code proper.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 18:55:36 +01:00
Johannes Schindelin
b9e7a5531f Help debugging with MSys2 by optionally executing bash with strace
MSys2's strace facility is very useful for debugging... With this patch,
the bash will be executed through strace if the environment variable
GIT_STRACE_COMMANDS is set, which comes in real handy when investigating
issues in the test suite.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-02-22 18:50:06 +01:00