Commit Graph

65907 Commits

Author SHA1 Message Date
Thomas Braun
654bbd852c 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>
2016-11-29 23:28:11 +01:00
Johannes Schindelin
4638a925c0 Start the merging-rebase to v2.11.0
This commit starts the rebase of 2608fdfc50 to d1271bddd4
2016-11-29 23:27:59 +01:00
Junio C Hamano
454cb6bd52 Git 2.11
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v2.11.0
2016-11-29 12:23:07 -08:00
Junio C Hamano
95c2b13a5f Merge branch 'jk/common-main'
Fix for a small regression in a topic already in 'master'.

* jk/common-main:
  common-main: stop munging argv[0] path
2016-11-29 12:22:13 -08:00
Junio C Hamano
061eeff104 Merge tag 'l10n-2.11.0-rnd3.1' of git://github.com/git-l10n/git-po
l10n-2.11.0-rnd3.1: update ru and ca translations

* tag 'l10n-2.11.0-rnd3.1' of git://github.com/git-l10n/git-po:
  l10n: ru.po: update Russian translation
  l10n: ca.po: update translation
2016-11-29 11:36:11 -08:00
Jeff King
6854a8f5c9 common-main: stop munging argv[0] path
Since 650c44925 (common-main: call git_extract_argv0_path(),
2016-07-01), the argv[0] that is seen in cmd_main() of
individual programs is always the basename of the
executable, as common-main strips off the full path. This
can produce confusing results for git-daemon, which wants to
re-exec itself.

For instance, if the program was originally run as
"/usr/lib/git/git-daemon", it will try just re-execing
"git-daemon", which will find the first instance in $PATH.
If git's exec-path has not been prepended to $PATH, we may
find the git-daemon from a different version (or no
git-daemon at all).

Normally this isn't a problem. Git commands are run as "git
daemon", the git wrapper puts the exec-path at the front of
$PATH, and argv[0] is already "daemon" anyway. But running
git-daemon via its full exec-path, while not really a
recommended method, did work prior to 650c44925. Let's make
it work again.

The real goal of 650c44925 was not to munge argv[0], but to
reliably set the argv0_path global. The only reason it
munges at all is that one caller, the git.c wrapper,
piggy-backed on that computation to find the command
basename.  Instead, let's leave argv[0] untouched in
common-main, and have git.c do its own basename computation.

While we're at it, let's drop the return value from
git_extract_argv0_path(). It was only ever used in this one
callsite, and its dual purposes is what led to this
confusion in the first place.

Note that by changing the interface, the compiler can
confirm for us that there are no other callers storing the
return value. But the compiler can't tell us whether any of
the cmd_main() functions (besides git.c) were relying on the
basename munging. However, we can observe that prior to
650c44925, no other cmd_main() functions did that munging,
and no new cmd_main() functions have been introduced since
then. So we can't be regressing any of those cases.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-11-29 11:01:48 -08:00
Jiang Xin
082ed8f870 Merge branch 'russian-l10n' of https://github.com/DJm00n/git-po-ru
* 'russian-l10n' of https://github.com/DJm00n/git-po-ru:
  l10n: ru.po: update Russian translation
2016-11-29 21:19:43 +08:00
Dimitriy Ryazantcev
f8f8b45d88 l10n: ru.po: update Russian translation
Signed-off-by: Dimitriy Ryazantcev <dimitriy.ryazantcev@gmail.com>
2016-11-29 11:33:07 +02:00
Alex Henrie
43a970d78b l10n: ca.po: update translation
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
2016-11-28 20:06:25 -07:00
Marc Branchaud
aeddbfdfa4 RelNotes: spelling and phrasing fixups
Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-11-28 15:58:48 -08:00
Junio C Hamano
6516e54fc5 Merge tag 'l10n-2.11.0-rnd3' of git://github.com/git-l10n/git-po
l10n-2.11.0-rnd3

* tag 'l10n-2.11.0-rnd3' of git://github.com/git-l10n/git-po:
  l10n: de.po: translate 210 new messages
  l10n: fix unmatched single quote in error message
2016-11-28 15:28:04 -08:00
Ralf Thielow
6366c34b89 l10n: de.po: translate 210 new messages
Translate 210 new messages came from git.pot update in fda7b09
(l10n: git.pot: v2.11.0 round 1 (209 new, 53 removed)) and c091ffb
(l10n: git.pot: v2.11.0 round 2 (1 new, 1 removed)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2016-11-28 18:49:25 +01:00
Jiang Xin
72351d7d4f l10n: fix unmatched single quote in error message
Translate one message introduced by commit:

 * 358718064b i18n: fix unmatched single quote in error message

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2016-11-25 23:26:34 +08:00
Johannes Schindelin
5f3656e4b4 Merge branch 'builtin-difftool'
This topic branch brings the new, experimental builtin version of the
difftool into Git for Windows' master branch.

It still hands off to the legacy Perl script unless the feature flag is
flipped: only when the config setting difftool.useBuiltin is set to true
will `git difftool` actually use the experimental builtin. The idea is to
play it safe for the majority of users, but to allow heavy difftool users
to test early and to help make the builtin robust, before we actually
retire the Perl script.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-11-24 22:31:28 +01:00
Johannes Schindelin
936afe95d1 Merge pull request #971 from jeffhostetler/jeffhostetler/add_preload_fscache
add: use preload-index and fscache for performance
2016-11-24 22:11:11 +01:00
Johannes Schindelin
a431a5fd4b Merge pull request #964 from jeffhostetler/jeffhostetler/memihash_perf
Jeffhostetler/memihash perf
2016-11-24 22:11:10 +01:00
Johannes Schindelin
1d2552ee11 mingw: make readlink() independent of core.symlinks
Regardless whether we think we are able to create symbolic links, we
should always read them.

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

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-11-24 22:11:10 +01:00
Jeff Hostetler
19aaf301cf name-hash: remember previous dir_entry during lazy_init_name_hash
Teach hash_dir_entry() to remember the previously found dir_entry
during lazy_init_name_hash() iteration.  This is a performance
optimization.  Since items in the index array are sorted by full
pathname, adjacent items are likely to be in the same directory.
This can save memihash() computations and HashMap lookups.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
2016-11-24 22:11:10 +01:00
Jeff Hostetler
4a64b91afc name-hash: specify initial size for istate.dir_hash table
Specify an initial size for the istate.dir_hash HashMap matching
the size of the istate.name_hash.

Previously hashmap_init() was given 0, causing a 64 bucket
hashmap to be created.  When working with very large
repositories, this would cause numerous rehash() calls to
realloc and rebalance the hashmap. This is especially true
when the worktree is deep, with many directories containing
a few files.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
2016-11-24 22:11:10 +01:00
Jeff Hostetler
79bcd45598 name-hash: precompute hash values during preload-index
Precompute the istate.name_hash and istate.dir_hash values
for each cache-entry during the preload-index phase.

Move the expensive memihash() calculations from lazy_init_name_hash()
to the multi-threaded preload-index phase.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
2016-11-24 22:11:10 +01:00
Jeff Hostetler
f2cbea605c hashmap: allow memihash computation to be continued
Add variant of memihash() to allow the hash computation to
be continued.  There are times when we compute the hash on
a full path and then the hash on just the path to the parent
directory.  This can be expensive on large repositories.

With this, we can hash the parent directory first. And then
continue the computation to include the "/filename".

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
2016-11-24 22:11:10 +01:00
Jeff Hostetler
eeb2150b71 name-hash: eliminate duplicate memihash call
Remove duplicate memihash() call in hash_dir_entry().
The existing code called memihash() to do the find_dir_entry()
and it not found, called memihash() again to do the hashmap_add().

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
2016-11-24 22:11:09 +01:00
Johannes Schindelin
ae75e8c5ad Merge pull request #955 from jeffhostetler/jeffhostetler/preload_index_perf
preload-index: avoid lstat for skip-worktree items
2016-11-24 22:11:08 +01:00
Jeff Hostetler
c4d2b1b44e preload-index: avoid lstat for skip-worktree items
Teach preload-index to avoid lstat() calls for index-entries
with skip-worktree bit set.  This is a performance optimization.

During a sparse-checkout, the skip-worktree bit is set on items
that were not populated and therefore are not present in the
worktree.  The per-thread preload-index loop performs a series
of tests on each index-entry as it attempts to compare the
worktree version with the index and mark them up-to-date.
This patch short-cuts that work.

On a Windows 10 system with a very large repo (450MB index)
and various levels of sparseness, performance was improved
in the {preloadindex=true, fscache=false} case by 80% and
in the {preloadindex=true, fscache=true} case by 20% for various
commands.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
2016-11-24 22:11:08 +01:00
Johannes Schindelin
95a19dd11e Merge pull request #938 from virtuald/patch-1
git-cvsexportcommit.perl: Force crlf translation
2016-11-24 22:11:07 +01:00
Dustin Spicuzza
a1d5be54c8 cvsexportcommit: force crlf translation
When using cvsnt + msys + git, it seems like the output of cvs status
had \r\n in it, and caused the command to fail.

This fixes that.

Signed-off-by: Dustin Spicuzza <dustin@virtualroadside.com>
2016-11-24 22:11:06 +01:00
Johannes Schindelin
5a55613426 Merge branch 'reset-stdin'
This topic branch adds the (experimental) --stdin/-z options to `git
reset`. Those patches are still under review in the upstream Git project,
but are already merged in their experimental form into Git for Windows'
`master` branch, in preparation for a MinGit-only release.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-11-24 22:11:05 +01:00
Johannes Schindelin
cc297c59a5 Merge branch 'mingw-strftime'
This topic branch works around an out-of-memory bug when the user
specified a format via --date=format:<format> that strftime() does
not like.

Reported by Stefan Naewe.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-11-24 22:11:04 +01:00
Johannes Schindelin
6f92bb1ba8 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-11-24 22:11:04 +01:00
Johannes Schindelin
61feb7cf88 Merge pull request #866 from landstander668/add_platform
Add reporting of build platform
2016-11-24 22:11:02 +01:00
Johannes Schindelin
29bcd1a3ff 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-11-24 22:11:01 +01:00
Johannes Schindelin
718dae2676 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-11-24 22:11:00 +01:00
Johannes Schindelin
7ba775a22e 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-11-24 22:10:59 +01:00
Johannes Schindelin
c9b76ac281 Merge pull request #797 from glhez/master
`git bundle create <bundle>` leaks handle the revlist is empty.
2016-11-24 22:10:58 +01:00
Johannes Schindelin
707f86684d Merge 'release-gc-repack' into HEAD 2016-11-24 22:10:56 +01:00
Johannes Schindelin
1be6fd2c5a 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-11-24 22:10:55 +01:00
Johannes Schindelin
ea292b51b8 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-11-24 22:10:52 +01:00
Johannes Schindelin
bfe52cfdd7 Merge pull request #677 from yaras/fix-git-675
Fixed masking username with asterisks when reading credentials
2016-11-24 22:10:51 +01:00
Johannes Schindelin
763e325fe8 Merge 'git-gui-add-2nd-line' into HEAD 2016-11-24 22:10:50 +01:00
Johannes Schindelin
70ff6f3b23 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-11-24 22:10:48 +01:00
Johannes Schindelin
c2213ca59b 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-11-24 22:10:47 +01:00
Johannes Schindelin
60b60cfd75 Merge 'unc-alternates' into HEAD 2016-11-24 22:10:46 +01:00
Johannes Schindelin
954b2ba8ef Merge pull request #552 from duncansmart/fix-vcproj-gen
Fix Visual Studio .sln/.vcproj generation.
2016-11-24 22:10:45 +01:00
Johannes Schindelin
d42571973b Merge pull request #773 from jeffhostetler/vs2015
Build with VS2015
2016-11-24 22:10:44 +01:00
Johannes Schindelin
b6b58ce1d1 Merge pull request #305 from dscho/msysgit_issues_182
Allow `add -p` and `add -i` with a large number of files
2016-11-24 22:10:42 +01:00
Johannes Schindelin
edddff8a15 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-11-24 22:10:41 +01:00
Johannes Schindelin
9908a38f3a Merge pull request #159 from dscho/vagrant
Add Vagrant support (easy Linux VM setup)
2016-11-24 22:10:40 +01:00
Johannes Schindelin
b4458812f1 Merge 'mingw-getcwd' into HEAD 2016-11-24 22:10:39 +01:00
Johannes Schindelin
fa39c208c7 Merge pull request #443 from kblees/kb/nanosecond-file-times-v2.5.3
nanosecond file times for v2.5.3
2016-11-24 22:10:37 +01:00
Johannes Schindelin
d98ee5d10d Merge pull request #156 from kblees/kb/symlinks
Symlink support
2016-11-24 22:10:36 +01:00