Commit Graph

50262 Commits

Author SHA1 Message Date
Johannes Schindelin
5cb5da5d2b Merge 'pull-rebase-interactive' into HEAD 2015-05-01 15:35:58 +02:00
Johannes Schindelin
2ab8483fa8 Merge 'jberezanski/wincred-sso-r2' into HEAD 2015-05-01 15:35:58 +02:00
Johannes Schindelin
1428890caf Merge 'gitk' into HEAD 2015-05-01 15:35:57 +02:00
Johannes Schindelin
464845bec6 Merge 'git-gui' into HEAD 2015-05-01 15:35:57 +02:00
Johannes Schindelin
6748be8565 Merge 'criss-cross-merge' into HEAD 2015-05-01 15:35:57 +02:00
Johannes Schindelin
3d7087ec78 Merge 'hide-dotgit' into HEAD 2015-05-01 15:35:57 +02:00
Johannes Schindelin
f60c36e995 Merge 'unicode' into HEAD 2015-05-01 15:35:57 +02:00
Johannes Schindelin
f50a14c685 Teach 'git remote' that the config var branch.*.rebase can be 'interactive'
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-05-01 15:33:28 +02:00
Johannes Schindelin
53235ecac7 Handle the branch.<name>.rebase value 'interactive'
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-05-01 15:33:28 +02:00
Johannes Schindelin
873a9f9050 Teach 'git pull' to handle --rebase=interactive
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-05-01 15:33:26 +02:00
Jakub Bereżański
ed5c27ccb9 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-05-01 15:33:00 +02:00
Jakub Bereżański
f309adddb6 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-05-01 15:33:00 +02:00
Sebastian Schuberth
7b34632214 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-05-01 15:32:59 +02:00
Johannes Schindelin
7a57fa7f8a git gui: set GIT_ASKPASS=git-gui--askpass if not set yet
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-05-01 15:32:59 +02:00
Chris West (Faux)
ec725b615f Fix another invocation of git from gitk with an overly long command-line
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
2015-05-01 15:32:59 +02:00
Heiko Voigt
9c7ebee328 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-05-01 15:32:59 +02:00
Johannes Schindelin
da3c93293f 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-05-01 15:32:59 +02:00
Heiko Voigt
3a1c5b91e6 Revert "git-gui: set GIT_DIR and GIT_WORK_TREE after setup"
This reverts commit a9fa11fe5b.
2015-05-01 15:32:59 +02:00
Johannes Sixt
35ccf9b18f criss cross rename failure workaround
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-05-01 15:32:58 +02:00
Pat Thoyts
0bfebaaf34 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-05-01 15:32:58 +02:00
Johannes Schindelin
8d253dee39 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-05-01 15:32:58 +02:00
Erik Faye-Lund
fd4a3e4d81 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-05-01 15:32:47 +02:00
Karsten Blees
d7a62316ab git-gui:handle the encoding of Git's output correctly
If we use 'eval exec $opt $cmdp $args' to execute git command,
tcl engine will convert the output of the git comand with the rule
system default code page to unicode.

But cp936 -> unicode conversion implicitly done by exec is not reversible.
So we have to use git_read instead.

Bug report and an original reproducer by Cloud Chou:
https://github.com/msysgit/git/issues/302

Karsten Blees writes this code patch.
Cloud Chou find the reason of the bug.

Thanks-to: dscho
Thanks-to: patthoyts
Signed-off-by: Karsten Blees <blees@dcon.de>
Original-test-by: Cloud Chou <515312382@qq.com>
Signed-off-by: Cloud Chou <515312382@qq.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-05-01 15:31:45 +02:00
Karsten Blees
bbb41a6e28 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-05-01 15:31:45 +02:00
Johannes Schindelin
d74a85fd6d Start the merging-rebase to v2.4.0
This commit starts the rebase of daaa7cd to 67308bd
2015-05-01 15:31:44 +02:00
Junio C Hamano
3d4a3ffe64 Git 2.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v2.4.0
2015-04-30 11:25:06 -07:00
Johannes Schindelin
0db3460e21 fixup! Windows: add support for a Windows-wide configuration
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-04-29 12:04:26 +02:00
Johannes Schindelin
ac5f8f3fca Merge pull request #104 from dscho/super-config
Add support for %PROGRAMDATA%\Git\config

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-04-29 11:22:14 +02:00
Johannes Schindelin
b336a3f532 Merge pull request #60 from weakcamel/fscanf-64bit-constants
Correct fscanf formatting string for I64u values

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-04-29 11:22:14 +02:00
Johannes Schindelin
36bd1d778f Merge pull request #98 from nalla/stdout-unbuffered
mingw: explicitly `fflush` stdout
2015-04-29 11:22:14 +02:00
Johannes Schindelin
81953920e1 Merge 'git-wrapper' into HEAD
Use msysGit's `git-wrapper` instead of the builtins. This works around
two issues:

- when the file system does not allow hard links, we would waste over
  800 megabyte by having 109 copies of a multi-megabyte executable

- even when the file system allows hard links, the Windows Explorer
  counts the disk usage as if it did not. Many users complained about
  Git for Windows using too much space (when it actually did not). We
  can easily avoid those user complaints by merging this branch.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-04-29 11:22:14 +02:00
Johannes Schindelin
a4b047368e Merge 'poll_inftim' into HEAD
This was originally 'pull request #330 from ethomson/poll_inftim' in
msysgit/git.

poll: honor the timeout on Win32

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-04-29 11:22:14 +02:00
Johannes Schindelin
dc43aa3802 Merge 'non-win-fixes' into HEAD 2015-04-29 11:22:14 +02:00
Johannes Schindelin
f79ca8fa4d Merge 'taskkill' into HEAD
git-gui/gitk: Do not use a Cygwin-specific kill flag on Windows

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-04-29 11:22:14 +02:00
Johannes Schindelin
548290d0b7 Merge 'sideband-bug' into HEAD
This works around the push-over-git-protocol issues pointed out in
https://github.com/msysgit/git/issues/101.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-04-29 11:22:14 +02:00
Johannes Schindelin
a3ebf72e7d Merge 'readme' into HEAD
Add a README.md for GitHub goodness.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-04-29 11:22:13 +02:00
Johannes Schindelin
a40252672b Document the Windows-wide config file
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-04-29 11:22:12 +02:00
Johannes Schindelin
d37ead55e4 Windows: add support for a Windows-wide configuration
Between the libgit2 and the Git for Windows project, there has been a
discussion how we could share Git configuration to avoid duplication (or
worse: skew).

Earlier, libgit2 was nice enough to just re-use Git for Windows'

	C:\Program Files (x86)\Git\etc\gitconfig

but with the upcoming Git for Windows 2.x, there would be more paths to
search, as we will have 64-bit and 32-bit versions, and the
corresponding config files will be in %PROGRAMFILES%\Git\mingw64\etc and
...\mingw32\etc, respectively.

Therefore we came to a consensus to use %PROGRAMDATA%\Git as the
location for Git-specific files that are of wider interest than just Git
for Windows.

On XP, there is no %PROGRAMDATA%, therefore we need to use
"%ALLUSERSPROFILE%\Application Data\Git\config" in those setups.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-04-29 11:19:04 +02:00
마누엘
0340124bf9 readme: added link to governance model
After publishing the governance model on the [developer
page](http://git-for-windows.github.io), lets add a link on the
`README.md` too.

Signed-off-by: 마누엘 <nalla@hamal.uberspace.de>
2015-04-29 11:19:00 +02:00
Johannes Schindelin
6760732560 Merge 'fix-is-exe' into HEAD 2015-04-29 11:12:30 +02:00
Johannes Schindelin
5035e42f6b Merge 'fix-externals' into HEAD 2015-04-29 11:12:30 +02:00
Johannes Schindelin
777bcb2a6b 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-04-29 11:12:30 +02:00
Johannes Schindelin
3aae40301c Merge 'win-tests-fixes' into HEAD 2015-04-29 11:12:30 +02:00
Johannes Schindelin
78d52e2389 Merge 'msys2' into HEAD
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-04-29 11:12:30 +02:00
Karsten Blees
e48c93780a git-wrapper: remove redundant TERM initialization
Remove redundant TERM initialization from git-wrapper in favor of TERM
initialization in git itself.

Signed-off-by: Karsten Blees <blees@dcon.de>
2015-04-29 11:12:11 +02:00
Karsten Blees
e4e2416986 git-wrapper: fix HOME initialization
git-wrapper fails to initialize HOME correctly if $HOMEDRIVE$HOMEPATH
points to a disconnected network drive.

Check if the directory exists before using $HOMEDRIVE$HOMEPATH.

Signed-off-by: Karsten Blees <blees@dcon.de>
2015-04-29 11:12:11 +02:00
Vitaly Takmazov
fdda9e451f git-wrapper: case-insensitive path comparison 2015-04-29 11:12:10 +02:00
Johannes Schindelin
f5e2c6bf64 git-wrapper: interpret --cd=<directory> when configured via resources
This change accompanies the `--no-cd` option when configured via
resources. It is required to support `Git Bash Here`: when
right-clicking an icon in the Explorer to start a Bash, the working
directory is actually the directory that is displayed in the Explorer.
That means if the clicked icon actually refers to a directory, the
working directory would be its *parent* directory.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-04-29 11:12:10 +02:00
Johannes Schindelin
4b33b05d66 git-wrapper: serve as git-gui.exe, too
To avoid that ugly Console window when calling \cmd\git.exe gui...

To avoid confusion with builtins, we need to move the code block
handling gitk (and now git-gui, too) to intercept before git-gui is
mistaken for a builtin.

Unfortunately, git-gui is in libexec/git-core/ while gitk is in bin/,
therefore we need slightly more adjustments than just moving and
augmenting the gitk case.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-04-29 11:12:10 +02:00
nalla
cbd67d2268 git-wrapper: support git.exe and gitk.exe to be in a spaced dir
When *Git for Windows* is installed into a directory that has spaces in
it, e.g. `C:\Program Files\Git`, the `git-wrapper` appends this directory
unquoted when fixing up the command line. To resolve this, just quote the
provided `execpath`.

Signed-off-by: nalla <nalla@hamal.uberspace.de>
2015-04-29 11:12:10 +02:00