Commit Graph

47262 Commits

Author SHA1 Message Date
Thomas Braun
abbd3499b4 Merge 'jberezanski/wincred-sso-r2' into HEAD 2014-10-13 17:33:22 +02:00
Thomas Braun
ddd114f905 Merge 'gitweb-syntax' into HEAD 2014-10-13 17:33:22 +02:00
Thomas Braun
06039426d1 Merge 'gitk' into HEAD 2014-10-13 17:33:22 +02:00
Thomas Braun
a3f4eb96c3 Merge 'git-gui' into HEAD 2014-10-13 17:33:21 +02:00
Thomas Braun
90f2fa804d Merge 'deny-current-branch' into HEAD 2014-10-13 17:33:21 +02:00
Thomas Braun
d82080f91a Merge 'criss-cross-merge' into HEAD 2014-10-13 17:33:20 +02:00
Thomas Braun
e16decf0b8 Merge 'am-submodules' into HEAD 2014-10-13 17:33:20 +02:00
Thomas Braun
411e946374 Merge 'hide-dotgit' into HEAD 2014-10-13 17:33:19 +02:00
Thomas Braun
3075a93e44 Merge 'unicode' into HEAD 2014-10-13 17:33:19 +02:00
Thomas Braun
584641d9b0 Merge 'refs/rewritten/junio/notyet' into HEAD 2014-10-13 17:33:19 +02:00
Jakub Bereżański
6c4d164a37 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>
2014-10-13 17:32:52 +02:00
Jakub Bereżański
5dbc1a6c39 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>
2014-10-13 17:32:51 +02:00
Johannes Schindelin
0a805a2d4a 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>
2014-10-13 17:32:50 +02:00
Johannes Schindelin
351800b4ef Only switch on the line number toggle when highlighting is activated
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-10-13 17:32:49 +02:00
Johannes Schindelin
b6d3d9de5e 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>
2014-10-13 17:32:49 +02:00
Johannes Schindelin
9ae3d87eec Gitweb: make line number toggling work for Firefox and Safari
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-10-13 17:32:49 +02:00
Johannes Schindelin
9df56e248a gitweb: Allow line number toggling with Javascript
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-10-13 17:32:48 +02:00
Sebastian Schuberth
0e393d1b33 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>
2014-10-13 17:32:47 +02:00
Chris West (Faux)
53ec268ba9 Fix another invocation of git from gitk with an overly long command-line
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
2014-10-13 17:32:47 +02:00
Johannes Schindelin
f8d79bfe9d 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>
2014-10-13 17:32:46 +02:00
Johannes Schindelin
4d44fb5fe7 git gui: set GIT_ASKPASS=git-gui--askpass if not set yet
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-10-13 17:32:45 +02:00
Heiko Voigt
ce06bddb0e 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>
2014-10-13 17:32:45 +02:00
Heiko Voigt
7fa0af021d Revert "git-gui: set GIT_DIR and GIT_WORK_TREE after setup"
This reverts commit a9fa11fe5b.
2014-10-13 17:32:44 +02:00
Johannes Schindelin
ed2eb2a0d7 Let deny.currentBranch=updateInstead ignore submodules
They are not affected by the update anyway.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-10-13 17:32:43 +02:00
Johannes Schindelin
d5ddd84148 Add a few more values for receive.denyCurrentBranch
For a long time, this developer thought that Git's insistence that
pushing into the current branch is evil was completely merited.

Just for fun, the original patch tried to show people that Git is
correct to forbid that, and that it causes more trouble than it does
good when Git allows you to try to update the working tree for
fast-forwards, or to detach the HEAD, depending on some config settings.

To the developer's surprise, the opposite was shown.

So here is the support for two new options you can give the config
variable receive.denyCurrentBranch:

'updateInstead':
	Try to merge the working tree with the new tip of the branch
	(which can lead to really horrible merge conflicts).

'detachInstead':
	Detach the HEAD, thereby avoiding a disagreement between the
	HEAD and the index (as well as the working tree), possibly
	leaving the local user wondering how on earth her HEAD became
	so detached.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-10-13 17:32:43 +02:00
Johannes Sixt
07f87b92c3 criss cross rename failure workaround
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2014-10-13 17:32:41 +02:00
Johannes Schindelin
510e07acd8 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>
2014-10-13 17:32:40 +02:00
Pat Thoyts
b1640904ef 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>
2014-10-13 17:32:39 +02:00
Johannes Schindelin
b54a698e3c 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>
2014-10-13 17:32:38 +02:00
Erik Faye-Lund
87ea955ee0 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>
2014-10-13 17:32:38 +02:00
Karsten Blees
a1cecde65f 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>
2014-10-13 17:32:37 +02:00
Erik Faye-Lund
750ca3a493 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>
2014-10-13 17:32:35 +02:00
Thomas Braun
3fa02b892c Start the merging-rebase to junio/maint
This commit starts the rebase of 20ba112 to 3c2dc76
2014-10-13 17:32:34 +02:00
dscho
3c2874ab70 Merge pull request #7 from dscho/mingw-tests
Prepare for more thorough testing when building in MinGW
2014-10-08 15:49:35 +02:00
Johannes Schindelin
f7ed2f682a 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>
2014-10-08 15:46:25 +02:00
Torsten Bögershausen
75c154e429 t0027: Tests for core.eol=native, eol=lf, eol=crlf
Add test cases for core.eol "native" and "" (unset).
(MINGW uses CRLF, all other systems LF as native line endings)

Add test cases for the attributes "eol=lf" and "eol=crlf"

Other minor changes:
- Use the more portable 'tr' instead of 'od -c' to convert '\n' into 'Q'
  and '\0' into 'N'
- Style fixes for shell functions according to the coding guide lines
- Replace "txtbin" with "attr"

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-10-08 15:46:25 +02:00
Junio C Hamano
3c2dc76f01 Merge branch 'maint-2.0' into maint
* maint-2.0:
  git-tag.txt: Add a missing hyphen to `-s`
2014-10-07 13:40:51 -07:00
Junio C Hamano
76f8611a5f Merge branch 'maint-1.9' into maint-2.0
* maint-1.9:
  git-tag.txt: Add a missing hyphen to `-s`
2014-10-07 13:40:39 -07:00
Junio C Hamano
9181365b85 Merge branch 'maint-1.8.5' into maint-1.9
* maint-1.8.5:
  git-tag.txt: Add a missing hyphen to `-s`
2014-10-07 13:40:19 -07:00
Junio C Hamano
b6e8269e9b Merge branch 'jk/mbox-from-line' into maint
Some MUAs mangled a line in a message that begins with "From " to
">From " when writing to a mailbox file and feeding such an input to
"git am" used to lose such a line.

* jk/mbox-from-line:
  mailinfo: work around -Wstring-plus-int warning
  mailinfo: make ">From" in-body header check more robust
2014-10-07 13:39:27 -07:00
Wieland Hoffmann
eeff891ac7 git-tag.txt: Add a missing hyphen to -s
Signed-off-by: Wieland Hoffmann <themineo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-10-07 11:08:06 -07:00
Sebastian Schuberth
49e78c2955 Merge pull request #4 from t-b/use-libpcre
Enable support for perl regular expressions (LIBPCRE)
2014-10-07 13:07:40 +02:00
dscho
2aebb6cfb3 Merge pull request #5 from t-b/dont_execute_test_which_errors_out
t0027: Disable test on MINGW
2014-10-06 13:15:33 +02:00
Thomas Braun
aaafeace16 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>
2014-10-02 14:43:05 +02:00
Thomas Braun
f94f0389fe Enable support for perl regular expressions (LIBPCRE)
Signed-off-by: Thomas Braun <thomas.braun@byte-physics.de>
2014-10-01 14:51:23 +02:00
dscho
545b284032 Merge pull request #3 from t-b/test-fixes-again
Final test fixes
2014-09-30 16:37:37 +02:00
Thomas Braun
8b9bc73316 fixup! t7800: Use "test_cmp_text" in all places where "echo" is used
This reverts commit 9264b1f.

test_cmp_text is not defined anymore and as of 4d715ac
(Windows: a test_cmp that is agnostic to random LF <> CRLF conversions)
this workaround is also not required anymore.

Signed-off-by: Thomas Braun <thomas.braun@byte-physics.de>
2014-09-30 15:23:47 +02:00
Thomas Braun
1e6e25c4e2 fixup! t0061: Work around a line endings issue with newer versions of cat on MSYS
This reverts commit 57a35fd.

test_cmp_text is not defined anymore and as of 4d715ac
(Windows: a test_cmp that is agnostic to random LF <> CRLF conversions)
this workaround is also not required anymore.

Signed-off-by: Thomas Braun <thomas.braun@byte-physics.de>
2014-09-30 15:18:45 +02:00
Thomas Braun
e008904d20 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>
2014-09-30 15:16:03 +02:00
Thomas Braun
3b72f3e5a5 t5503: Mark flaky tests as known breakages
As non reliable tests are nasty.

Signed-off-by: Thomas Braun <thomas.braun@byte-physics.de>
2014-09-30 15:16:02 +02:00