Commit Graph

63423 Commits

Author SHA1 Message Date
Johannes Schindelin
0b89bb97f4 Unbreak interactive GPG prompt upon signing
With the recent update in efee955 (gpg-interface: check gpg signature
creation status, 2016-06-17), we ask GPG to send all status updates to
stderr, and then catch the stderr in an strbuf.

But GPG might fail, and send error messages to stderr. And we simply
do not show them to the user.

Even worse: this swallows any interactive prompt for a passphrase. And
detaches stderr from the tty so that the passphrase cannot be read.

So while the first problem could be fixed (by printing the captured
stderr upon error), the second problem cannot be easily fixed, and
presents a major regression.

So let's just revert commit efee9553a4.

This fixes https://github.com/git-for-windows/git/issues/871

Cc: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-09-12 10:04:27 +02:00
Johannes Schindelin
98a51c6cbb Merge branch 'mmap-regexec'
This topic branch fixes a segmentation fault when using `-G` or `-S
--pickaxe-regex` with `git diff` on new-born files that are configured
without user diff drivers, and that hence get mmap()ed into memory.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-09-12 10:04:27 +02:00
Johannes Schindelin
d5c8b17ac8 Merge pull request #866 from landstander668/add_platform
Add reporting of build platform
2016-09-12 10:04:25 +02:00
Johannes Schindelin
6f5723b1c1 Merge branch 'interactive-rebase'
This series of branches introduces the git-rebase--helper, a builtin
helping to accelerate the interactive rebase dramatically.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-09-12 10:04:24 +02:00
Adric Norris
25f443fbbd Preliminary support for reporting build platform
Add preliminary support for detection of the build plaform, and reporting
of same with the `git version --build-options' command. This can be useful
for bug reporting, to distinguish between 32 and 64-bit builds for
example.

The current implementation can only distinguish between x86 and x86_64.
This will be extended in future patches. In addition, all 32-bit variants
(i686, i586, etc.) are collapsed into `x86'. An example of the output is:

   $ git version --build-options
   git version 2.9.3.windows.2.826.g06c0f2f
   sizeof-long: 4
   machine: x86_64

The label of `machine' was chosen so the new information will approximate
the output of `uname -m'.

Signed-off-by: Adric Norris <landstander668@gmail.com>
2016-09-12 10:04:19 +02:00
Johannes Schindelin
0636fc1131 Merge 'cat-file-filters'
This topic branch adds the support for --filters (TAFKA --smudge) and
--path (TAFKA --use-path).

While at it, we also add support for --filters/--textconv in --batch mode
(the input lines now need to contain the path in addition to the object
name, separated by a single white space character).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-09-12 10:04:18 +02:00
Johannes Schindelin
1d34bfad9a Merge branch 'unhidden-git'
It has been reported that core.hideDotFiles=false stopped working...
This topic branch fixes it.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-09-12 10:04:17 +02:00
Johannes Schindelin
b60ac3c29a Merge branch 'status-no-lock-index'
This branch allows third-party tools to call `git status
--no-lock-index` to avoid lock contention with the interactive Git usage
of the actual human user.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-09-12 10:04:16 +02:00
Johannes Schindelin
c22537aee3 Merge 'jh/status-v2-porcelain'
Backported onto `maint` by me...

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-09-12 10:04:15 +02:00
Johannes Schindelin
b34fe77aad Merge pull request #797 from glhez/master
`git bundle create <bundle>` leaks handle the revlist is empty.
2016-09-12 10:04:14 +02:00
Johannes Schindelin
86b3ff4045 Merge 'release-gc-repack' into HEAD 2016-09-12 10:04:13 +02:00
Johannes Schindelin
c3df269137 Merge pull request #726 from orgads/git-gui-preserve-author-windows
git-gui: Do not reset author details on amend
2016-09-12 10:04:12 +02:00
Johannes Schindelin
a8b4aa8b29 Merge branch 'spawn-with-spaces'
This change lets us spawn .bat scripts whose paths contain spaces.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-09-12 10:04:12 +02:00
Johannes Schindelin
a956bedc1f mingw: respect core.hidedotfiles = false in git-init again
This is a brown paper bag. When adding the tests, we actually failed
to verify that the config variable is heeded in git-init at all. And
when changing the original patch that marked the .git/ directory as
hidden after reading the config, it was lost on this developer that
the new code would use the hide_dotfiles variable before the config
was read.

The fix is obvious: read the (limited, pre-init) config *before*
creating the .git/ directory.

This fixes https://github.com/git-for-windows/git/issues/789

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-09-12 10:04:09 +02:00
Johannes Schindelin
e74b4abda3 status: offer *not* to lock the index and update it
When a third-party tool periodically runs `git status` in order to keep
track of the state of the working tree, it is a bad idea to lock the
index: it might interfere with interactive commands executed by the
user, e.g. when the user wants to commit files.

Let's introduce the option `--no-lock-index` to prevent such problems.
The idea is that the third-party tool calls `git status` with this
option, preventing it from ever updating the index.

The downside is that the periodic `git status` calls will be a little
bit more wasteful because they may have to refresh the index repeatedly,
only to throw away the updates when it exits. This cannot really be
helped, though, as tools wanting to get a periodic update of the status
have no way to predict when the user may want to lock the index herself.

Note that the regression test added in this commit does not *really*
verify that no index.lock file was written; that test is not possible in
a portable way. Instead, we verify that .git/index is rewritten *only*
when `git status` is run without `--no-lock-index`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-09-12 10:04:08 +02:00
Gaël Lhez
8f7b857d7f git bundle create <bundle> leaks handle the revlist is empty.
issue #790: git bundle create does not close handle to *.lock file

This problem happens when an user tries to create an empty bundle, using the
following command:  `git bundle create <bundle> <revlist>` and when <revlist>
resolve to an empty list (for example, like `master..master`), `git bundle` fails
and warn the user about how it don't want to create empty bundle.

In that case, git tries to delete the `<bundle>.lock` file, and since there's still
an open file handle, fails to do so and ask the user if it should retry (which will
fail again).

The lock can still be deleted manually by the user (and it is required if the user
want to create a bundle after revising his rev-list).

Signed-off-by: Gaël Lhez <gael.lhez@gmail.com>
2016-09-12 10:04:05 +02:00
Johannes Schindelin
4002f02884 gc/repack: release packs when needed
On Windows, files cannot be removed nor renamed if there are still
handles held by a process. To remedy that, we introduced the
close_all_packs() function.

Earlier, we made sure that the packs are released just before `git gc`
is spawned, in case that gc wants to remove no-longer needed packs.

But this developer forgot that gc itself also needs to let go of packs,
e.g. when consolidating all packs via the --aggressive option.

Likewise, `git repack -d` wants to delete obsolete packs and therefore
needs to close all pack handles, too.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-09-12 10:04:04 +02:00
Orgad Shaneh
e14ef40dab git-gui: Do not reset author details on amend
git commit --amend preserves the author details unless --reset-author is
given.

git-gui discards the author details on amend.

Fix by reading the author details along with the commit message, and
setting the appropriate environment variables required for preserving
them.

Reported long ago in the mailing list[1].

[1] http://article.gmane.org/gmane.comp.version-control.git/243921

Signed-off-by: Orgad Shaneh <orgad.shaneh@audiocodes.com>
2016-09-12 10:04:03 +02:00
Johannes Schindelin
f9017b7d8f Merge pull request #677 from yaras/fix-git-675
Fixed masking username with asterisks when reading credentials
2016-09-12 10:04:01 +02:00
Johannes Schindelin
b328a5a4e9 mingw: support spawning programs containing spaces in their names
The CreateProcessW() function does not really support spaces in its
first argument, lpApplicationName. But it supports passing NULL as
lpApplicationName, which makes it figure out the application from the
(possibly quoted) first argument of lpCommandLine.

Let's use that trick (if we are certain that the first argument matches
the executable's path) to support launching programs whose path contains
spaces.

This fixes https://github.com/git-for-windows/git/issue/692

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-09-12 10:04:01 +02:00
Johannes Schindelin
bbaf9b1f35 Merge pull request #665 from yaras/fix-git-664
Fix initial git gui message encoding
2016-09-12 10:04:00 +02:00
Johannes Schindelin
d75dccce09 Merge 'git-gui-add-2nd-line' into HEAD 2016-09-12 10:03:59 +02:00
Johannes Schindelin
555559c39c Merge pull request #620 from sidecut/sidecut-gitk-list-references-window-width
Make the "list references" default window width wider
2016-09-12 10:03:58 +02:00
Johannes Schindelin
c5f1cbc5f9 Merge branch 'gitk-cursor-keys'
This patch needs to be contributed to gitk proper, of course.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-09-12 10:03:57 +02:00
Johannes Schindelin
ec813ff544 Merge branch 'clean-long-paths'
This addresses https://github.com/git-for-windows/git/issues/521

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-09-12 10:03:57 +02:00
Johannes Schindelin
442f673b59 Merge 'aslr' into HEAD
Address Space Layout Randomization (ASLR) allows executables' memory
layout to change at random between runs, and therefore offers a quite
decent protection against many attacks.

We enable ASLR because MSYS2's C compiler offers support for ASLR, and
whatever performance impact it has is neglible, according to
https://insights.sei.cmu.edu/cert/2014/02/differences-between-aslr-on-windows-and-linux.html

This merges the part of https://github.com/git-for-windows/git/pull/612
that does not break Git ;-)

This fixes https://github.com/git-for-windows/git/issues/608

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-09-12 10:03:56 +02:00
Johannes Schindelin
705b853172 Merge 'unc-alternates' into HEAD 2016-09-12 10:03:55 +02:00
Johannes Schindelin
70ee0deafc Merge pull request #552 from duncansmart/fix-vcproj-gen
Fix Visual Studio .sln/.vcproj generation.
2016-09-12 10:03:54 +02:00
Johannes Schindelin
fbe9f6b0fd Merge 'mingw/default-ident'
Improve the default user name & email logic

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-09-12 10:03:53 +02:00
Johannes Schindelin
34a6f159a5 Merge branch 'msys2-git-gui'
This topic branch addresses the bug where Git for Windows 2.x' Git GUI
failed to generate a working shortcut via Repository>Create Desktop
Shortcut.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-09-12 10:03:53 +02:00
Johannes Schindelin
bcf21350f8 Merge pull request #443 from kblees/kb/nanosecond-file-times-v2.5.3
nanosecond file times for v2.5.3
2016-09-12 10:03:52 +02:00
Johannes Schindelin
1a99d3733d Merge pull request #305 from dscho/msysgit_issues_182
Allow `add -p` and `add -i` with a large number of files
2016-09-12 10:03:51 +02:00
Johannes Schindelin
5b88fbe68b Merge pull request #246 from uecasm/patch-1
Verify memoized files can be reloaded before using them
2016-09-12 10:03:51 +02:00
Johannes Schindelin
4f69736b2e Merge branch 'program-data-config'
This branch introduces support for reading the "Windows-wide" Git
configuration from `%PROGRAMDATA%\Git\config`. As these settings are
intended to be shared between *all* Git-related software, that config
file takes an even lower precedence than `$(prefix)/etc/gitconfig`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-09-12 10:03:50 +02:00
Johannes Schindelin
1c7e6ee5be Merge pull request #159 from dscho/vagrant
Add Vagrant support (easy Linux VM setup)
2016-09-12 10:03:49 +02:00
Johannes Schindelin
077864b89f Merge 'mingw-getcwd' into HEAD 2016-09-12 10:03:48 +02:00
Johannes Schindelin
30bbe24fbb Merge pull request #156 from kblees/kb/symlinks
Symlink support
2016-09-12 10:03:47 +02:00
Johannes Schindelin
15e15cf684 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>
2016-09-12 10:03:47 +02:00
Johannes Schindelin
9f74522320 Merge 'fix-is-exe' into HEAD 2016-09-12 10:03:46 +02:00
Johannes Schindelin
a5425dee18 Merge 'fix-externals' into HEAD 2016-09-12 10:03:45 +02:00
Johannes Schindelin
376cfb7aa0 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>
2016-09-12 10:03:44 +02:00
Johannes Schindelin
2dd13a419d Merge 'win-tests-fixes' into HEAD 2016-09-12 10:03:44 +02:00
Johannes Schindelin
b62d7bbfb8 Merge 'msys2' into HEAD
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-09-12 10:03:43 +02:00
Johannes Schindelin
c6430561d2 Merge 'jberezanski/wincred-sso-r2' into HEAD 2016-09-12 10:03:42 +02:00
Johannes Schindelin
7732b9fe47 Merge 'gitk' into HEAD 2016-09-12 10:03:41 +02:00
Johannes Schindelin
8ea7a862c0 Merge 'git-gui' into HEAD 2016-09-12 10:03:40 +02:00
Johannes Schindelin
8f3e3956c6 Merge 'unicode' into HEAD 2016-09-12 10:03:40 +02:00
Johannes Schindelin
6bd9b67417 Merge 'readme' into HEAD
Add a README.md for GitHub goodness.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-09-12 10:03:39 +02:00
yaras
b582592aab Do not mask the username when reading credentials
When user is asked for credentials there is no need to mask username,
so PROMPT_ASKPASS flag on calling credential_ask_one for login is
unnecessary.

credential_ask_one internally uses git_prompt which in case of given
flag PROMPT_ASKPASS uses masked input method instead of
git_terminal_prompt, which does not mask user input.

This fixes #675

Signed-off-by: yaras <yaras6@gmail.com>
2016-09-12 10:03:37 +02:00
yaras
5ff0f2928b Fix initial git gui message encoding
This fix refers https://github.com/git-for-windows/git/issues/664

After `git merge --squash` git creates .git/SQUASH_MSG (UTF-8 encoded)
which contains squashed commits. When run `git gui` it copies SQUASH_MSG
to PREPARE_COMMIT_MSG, but without honoring UTF-8. This leads to encoding
problems on `git gui` commit prompt.

The same applies on git cherry-pick conflict, where MERGE_MSG is created
and then is copied to PREPARE_COMMIT_MSG.

In both cases PREPARE_COMMIT_MSG must be configured to store data in UTF-8.

Signed-off-by: yaras <yaras6@gmail.com>
2016-09-12 10:03:36 +02:00