Commit Graph

65907 Commits

Author SHA1 Message Date
Johannes Schindelin
e77e645562 contrib/buildsystems: handle options starting with a slash
With the recent changes to allow building with MSVC=1, we now pass the
/OPT:REF option to the compiler. This confuses the parser that wants to
turn the output of a dry run into project definitions for QMake and Visual
Studio:

	Unhandled link option @ line 213: /OPT:REF at [...]

Let's just extend the code that passes through options that start with a
dash, so that it passes through options that start with a slash, too.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-11-30 17:59:17 +01:00
Philip Oakley
142041123c contrib/buildsystems: optionally capture the dry-run in a file
Add an option for capturing the output of the make dry-run used in
determining the msvc-build structure for easy debugging.

You can use the output of `--make-out <path>` in subsequent runs via the
`--in <path>` option.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-11-30 17:59:17 +01:00
Johannes Schindelin
cd62af22fc contrib/buildsystems: handle libiconv, too
Git's test suite shows tons of breakages unless Git is compiled
*without* NO_ICONV. That means, in turn, that we need to generate
build definitions *with* libiconv, which in turn implies that we
have to handle the -liconv option properly.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-11-30 17:59:17 +01:00
Johannes Schindelin
6b376d0ac3 contrib/buildsystems: ignore irrelevant files in Generators/
The Generators/ directory can contain spurious files such as editors'
backup files. Even worse, there could be .swp files which are not even
valid Perl scripts.

Let's just ignore anything but .pm files in said directory.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-11-30 17:59:17 +01:00
Philip Oakley
d56e0e5464 contrib/buildsystems: handle the curl library option
Upon seeing the '-lcurl' option, point to the libcurl.lib.

While there, fix the elsif indentation.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-11-30 17:59:16 +01:00
Philip Oakley
df0fd7cddd contrib/buildsystems: redirect errors of the dry run into a log file
Rather than swallowing the errors, it is better to have them in a file.

To make it obvious what this is about, use the file name
'msvc-build-makedryerrors.txt'.

Further, if the output is empty, simply delete that file. As we target
Git for Windows' SDK (which, unlike its predecessor msysGit, offers
Perl versions newer than 5.8), we can use the quite readable syntax
`if -f -z $ErrsFile` (available in Perl >=5.10).

Note that the file will contain the new values of the GIT_VERSION
and GITGUI_VERSION if they were generated by the make file. They
are omitted if the release is tagged and indentically defined in
their respective GIT_VERSION_GEN file DEF_VER variables.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-11-30 17:59:16 +01:00
Philip Oakley
a40e119986 contrib/buildsystems: ignore gettext stuff
Git's build contains steps to handle internationalization. This caused
hiccups in the parser used to generate QMake/Visual Studio project files.

As those steps are irrelevant in this context, let's just ignore them.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-11-30 17:59:16 +01:00
Philip Oakley
f233b5ce42 contrib/buildsystems: handle quoted spaces in filenames
The engine.pl script expects file names not to contain spaces. However,
paths with spaces are quite prevalent on Windows. Use shellwords() rather
than split() to parse them correctly.

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-11-30 17:59:16 +01:00
Philip Oakley
d7353cfa2f contrib/buildsystems: fix misleading error message
The error message talked about a "lib option", but it clearly referred
to a link option.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-11-30 17:59:16 +01:00
Johannes Schindelin
8a48ddb260 .gitignore: ignore Visual Studio's temporary/generated files
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-11-30 17:59:16 +01:00
Philip Oakley
4dc105d263 .gitignore: ignore library directories created by MSVC VS2008 buildsystem
Signed-off-by: Philip Oakley <philipoakley@iee.org>
2016-11-30 15:30:41 +01:00
Philip Oakley
519d2f4043 .gitignore: improve MSVC ignore patterns
Add the Microsoft .manifest pattern, and correct the generic 'Debug'
and 'Release' directory patterns which were mechanically adjusted way
back in c591d5f (gitignore: root most patterns at the top-level directory,
2009-10-26) to allow multi-level projects within the Git suite.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
2016-11-30 15:30:41 +01:00
Johannes Schindelin
b95726dd8b squash! msvc: add NuGet scripts for building with VS2015
We need to be very precise when specifying NuGet package versions: while
nuget.exe auto-completes a version, say, 1.0.2 to 1.0.2.0, we will want
to parse packages.config ourselves, to generate the Visual Studio
solution, and there we need the exact version number to be able to
generate the exact path to the correct .targets file.
2016-11-25 14:00:53 +01: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