Commit Graph

102441 Commits

Author SHA1 Message Date
Johannes Schindelin
b2da288352 ci(osx): use new location of the perforce cask
The CI builds are failing for Mac OS X due to a change in the
location of the perforce cask. The command outputs the following
error:

    + brew install caskroom/cask/perforce
    Error: caskroom/cask was moved. Tap homebrew/cask-cask instead.

Preface the "brew install caskroom/cask/perforce" with the old
way of installing perforce, and only try this method if the
"brew install perforce" fails.

The existing way to use caskroom was added in 672f51cb (travis-ci:
fix Perforce install on macOS, 2017-01-22) and the justification
is that the "brew install perforce" can fail due to a hash
mis-match. The mismatch is due to the official Perforce distro
updating the published binaries without updating the version
string. CI servers are typically fresh virtual machines, so that
issue should not arise in automated builds.

Even if a build server is re-used and hits the hash mis-match,
it will fall back to the "new" mechanism which is currently
failing, but may be fixed independently of this change.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
2019-10-17 10:36:57 +02:00
Johannes Schindelin
cd9994f969 Merge pull request #2351 from PhilipOakley/vcpkg-tip
Vcpkg Install: detect lack of working Git, and note possible vcpkg time outs
2019-10-07 12:06:14 +02:00
Philip Oakley
661322879b vcpkg_install: add comment regarding slow network connections
The vcpkg downloads may not succeed. Warn careful readers of the time out.

A simple retry will usually resolve the issue.

Signed-off-by: Philip Oakley <philipoakley@iee.email>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-10-07 12:05:13 +02:00
Philip Oakley
d5f4a0cf30 vcpkg_install: detect lack of Git
The vcpkg_install batch file depends on the availability of a
working Git on the CMD path. This may not be present if the user
has selected the 'bash only' option during Git-for-Windows install.

Detect and tell the user about their lack of a working Git in the CMD
window.

Fixes #2348.
A separate PR https://github.com/git-for-windows/build-extra/pull/258
now highlights the recommended path setting during install.

Signed-off-by: Philip Oakley <philipoakley@iee.email>
2019-10-06 19:49:32 +01:00
Johannes Schindelin
d01cfebc01 Merge pull request #2336 from dscho/program-data-config-owned-by-specific-administrator
Do not complain if `C:\ProgramData\Git\config` is owned by a specific administrator
2019-10-02 14:38:02 +02:00
Johannes Schindelin
8c5225c259 Merge pull request #2311 from PhilipOakley/versionnumbers
Security.md: include release candidate and snapshot information
2019-09-30 20:21:44 +02:00
Johannes Schindelin
b7585cc1c8 fixup! SECURITY.md: document Git for Windows' policies
Fix a few more unclear/incorrect phrasings (while the perfect is the
enemy of the good, the vague and the not-quite-right are the enemy of
the good-enough).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-09-30 20:18:56 +02:00
Philip Oakley
cf62fff637 fixup! SECURITY.md: document Git for Windows' policies
As suggested in
https://github.com/git-for-windows/git/pull/2303#issuecomment-524351036:

Also mention the release candidate and snapshot version numberings, e.g.
that the final release's installer will claim that the release candidates
are newer than the proper release.

And also note the existence of the snapshots; This may encourage others
to participate in the 'development'.

Signed-off-by: Philip Oakley <philipoakley@iee.email>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-09-30 20:05:43 +02:00
Johannes Schindelin
89eadabf80 Merge pull request #2297 from gix/fix/gitk-escape-paths
gitk: Escape file paths before piping to git log
2019-09-24 17:33:59 +02:00
Johannes Schindelin
8f8ffd9a00 config: treat any member of BUILTIN\Administrators as trusted
We recently hardened Git for Windows by ignoring
`C:\ProgramData\Git\config` files unless they are owned by the system
account, by the administrators group, or by the account under which Git
is running.

Turns out that there are situations when that config file is owned by
_an_ administrator, not by the entire administrators group, and that
still is okay. This can happen very easily e.g. in Docker Containers.

Let's add a fall back when the owner is none of the three currently
expected ones, enumerating the members of the administrators group and
comparing them to the file's owner. If a match is found, the owner is
not dubious.

Enumerating groups' members on Windows is not exactly a cheap operation,
and it requires linking to the `netapi32.dll`. Since this is rarely
needed, and since this is done at most a handful of times during any Git
process' life cycle, it is okay that it is a bit expensive. To avoid the
startup cost of linking to yet another DLL, we do this lazily instead:
that way, the vast majority of Git for Windows' users will not feel any
impact by this patch.

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

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-09-18 11:32:34 +02:00
Johannes Schindelin
2608f2eaa7 fixup! Windows: add support for a Windows-wide configuration
Let's refactor the `validate_system_file_ownership()` a bit, not only to
clarify what is done, but also to prepare for maybe adding a slighty
more expensive check: it is possible that the file
`C:\ProgramData\Git\config` is owned by the local administrator (who has
a different SID than the `Administrators` group).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-09-17 23:48:39 +02:00
Johannes Schindelin
de7827bd27 Merge pull request #2315 from ROGERSM94/fix-rebase
rebase-merges: improve --rebase-merges label generation
2019-09-02 15:08:50 +02:00
Matt R
d3d6c4e420 rebase -r: let label generate safer labels
The `label` todo command in interactive rebases creates temporary refs
in the `refs/rewritten/` namespace. These refs are stored as loose refs,
i.e. as files in `.git/refs/rewritten/`, therefore they have to conform
with file name limitations on the current filesystem.

This poses a problem in particular on NTFS/FAT, where e.g. the colon
character is not a valid part of a file name.

Let's safeguard against this by replacing not only white-space
characters by dashes, but all non-alpha-numeric ones.

However, we exempt non-ASCII UTF-8 characters from that, as it should be
quite possible to reflect branch names such as `↯↯↯` in refs/file names.

Signed-off-by: Matthew Rogers <mattr94@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-09-02 14:11:11 +02:00
Johannes Schindelin
94ef49fdd4 Merge pull request #2316 from carenas/win-pcre1-cleanup
config.mak.uname: PCRE1 cleanup
2019-09-02 13:53:04 +02:00
Carlo Marcelo Arenas Belón
c3b0af9a65 config.mak.uname: PCRE1 cleanup
no longer relevant after moving to PCRE2

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
2019-08-31 06:30:18 -07:00
Johannes Schindelin
d7ae4d7b27 Merge pull request #2303 from git-for-windows/security.md
SECURITY.md: document Git for Windows' policies
2019-08-23 16:42:07 +02:00
Johannes Schindelin
41f46243bd SECURITY.md: document Git for Windows' policies
This is the recommended way on GitHub to describe policies revolving around
security issues and about supported versions.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-08-23 14:14:42 +02:00
Nico Rieck
f0fe5288db gitk: Escape file paths before piping to git log
Fixes https://github.com/git-for-windows/git/issues/2293

Signed-off-by: Nico Rieck <nico.rieck@gmail.com>
2019-08-22 20:55:51 +02:00
Johannes Schindelin
4db2e5cc9e Merge 'readme' into HEAD
Add a README.md for GitHub goodness.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
v2.23.0.windows.1
2019-08-17 00:15:16 +02:00
Johannes Schindelin
a7b10db011 Merge pull request #1354 from dscho/phase-out-show-ignored-directory-gracefully
Phase out `--show-ignored-directory` gracefully
2019-08-17 00:15:15 +02:00
Johannes Schindelin
945c2b1f25 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>
2019-08-17 00:15:15 +02:00
Johannes Schindelin
ccd67ba563 Merge pull request #1170 from dscho/mingw-kill-process
Handle Ctrl+C in Git Bash nicely

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-08-17 00:15:14 +02:00
Johannes Schindelin
590e23eed6 Merge branch 'busybox-w32'
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-08-17 00:15:14 +02:00
Johannes Schindelin
7199b0195c Merge pull request #1897 from piscisaureus/symlink-attr
Specify symlink type in .gitattributes
2019-08-17 00:15:14 +02:00
Johannes Schindelin
15775025a7 Merge 'docker-volumes-are-no-symlinks'
This was pull request #1645 from ZCube/master

Support windows container.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-08-17 00:15:13 +02:00
Johannes Schindelin
2128137be9 Merge branch 'kblees/kb/symlinks' 2019-08-17 00:15:13 +02:00
Johannes Schindelin
9d62a57344 Merge branch 'msys2' 2019-08-17 00:15:12 +02:00
Johannes Schindelin
7111da72e9 Merge branch 'long-paths' 2019-08-17 00:15:12 +02:00
Johannes Schindelin
07a1b862af Merge branch 'dont-clean-junctions-fscache'
We already avoid traversing NTFS junction points in `git clean -dfx`.
With this topic branch, we do that when the FSCache is enabled, too.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-08-17 00:15:12 +02:00
Derrick Stolee
86310c6739 Merge branch 'fscache-and-sparse-checkout'
When updating the skip-worktree bits in the index to align with new
values in a sparse-checkout file, Git scans the entire working
directory with lstat() calls. In a sparse-checkout, many of these
lstat() calls are for paths that do not exist.

Enable the fscache feature during this scan.

In a local test of a repo with ~2.2 million paths, updating the index
with `git read-tree -m -u HEAD` with a sparse-checkout file containing
only `/.gitattributes` improved from 2-3 minutes to 15-20 seconds.

More work could be done to stop running lstat() calls when recursing
into directories that are known to not exist.
2019-08-17 00:15:11 +02:00
Johannes Schindelin
7693dacc8e Merge pull request #1937 from benpeart/fscache-NtQueryDirectoryFile-gfw
fscache: teach fscache to use NtQueryDirectoryFile
2019-08-17 00:15:11 +02:00
Johannes Schindelin
6901e28feb Merge pull request #1934 from benpeart/fscache-thread-safe-enable-gfw
fscache: make fscache_enable() thread safe
2019-08-17 00:15:11 +02:00
Johannes Schindelin
8180055540 Merge remote-tracking branch 'benpeart/fscache-per-thread-gfw'
This brings substantial wins in performance because the FSCache is now
per-thread, being merged to the primary thread only at the end, so we do
not have to lock (except while merging).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-08-17 00:15:10 +02:00
Johannes Schindelin
76270bd250 Merge pull request #1910 from benpeart/fscache_statistics-gfw
fscache: add fscache hit statistics
2019-08-17 00:15:10 +02:00
Johannes Schindelin
12717465f0 Merge pull request #1914 from benpeart/free-fscache-after-add-gfw
At the end of the add command, disable and free the fscache
2019-08-17 00:15:10 +02:00
Johannes Schindelin
25277f41f6 Merge pull request #1911 from benpeart/git_test_fscache-gfw
fscache: add GIT_TEST_FSCACHE support
2019-08-17 00:15:09 +02:00
Johannes Schindelin
63be74dc24 Merge pull request #1909 from benpeart/free-fscache-after-status-gfw
status: disable and free fscache at the end of the status command
2019-08-17 00:15:09 +02:00
Johannes Schindelin
598fc3f7dd Merge pull request #1908 from benpeart/FindFirstFileEx-gfw
fscache: use FindFirstFileExW to avoid retrieving the short name
2019-08-17 00:15:09 +02:00
Johannes Schindelin
a8bac60d65 Merge pull request #1827 from benpeart/fscache_refresh_index
Enable the filesystem cache (fscache) in refresh_index().
2019-08-17 00:15:08 +02:00
Johannes Schindelin
69ef7ebd44 Merge pull request #1468 from atetubou/fscache_checkout_flush
checkout.c: enable fscache for checkout again

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-08-17 00:15:08 +02:00
Johannes Schindelin
dd8ced59ad Merge pull request #1426 from atetubou/fetch_pack
fetch-pack.c: enable fscache for stats under .git/objects
2019-08-17 00:15:08 +02:00
Johannes Schindelin
0d9eb776d7 Merge pull request #1344 from jeffhostetler/perf_add_excludes_with_fscache
dir.c: make add_excludes aware of fscache during status
2019-08-17 00:15:07 +02:00
Johannes Schindelin
7d3ecab8aa Merge pull request #971 from jeffhostetler/jeffhostetler/add_preload_fscache
add: use preload-index and fscache for performance
2019-08-17 00:15:07 +02:00
Johannes Schindelin
c8f769b9ff Merge pull request #994 from jeffhostetler/jeffhostetler/fscache_nfd
fscache: add not-found directory cache to fscache
2019-08-17 00:15:07 +02:00
Johannes Schindelin
22452e5816 Merge branch 'fscache' 2019-08-17 00:15:07 +02:00
Johannes Schindelin
4c178b2141 Merge 'add-p-many-files'
This topic branch allows `add -p` and `add -i` with a large number of
files. It is kind of a hack that was never really meant to be
upstreamed. Let's see if we can do better in the built-in `add -p`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-08-17 00:15:06 +02:00
Johannes Schindelin
866ced2012 Merge branch 'inherit-only-stdhandles'
When spawning child processes, we do want them to inherit the standard
handles so that we can talk to them. We do *not* want them to inherit
any other handle, as that would hold a lock to the respective files
(preventing them from being renamed, modified or deleted), and the child
process would not know how to access that handle anyway.

Happily, there is an API to make that happen. It is supported in Windows
Vista and later, which is exactly what we promise to support in Git for
Windows for the time being.

This also means that we lift, at long last, the target Windows version
from Windows XP to Windows Vista.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-08-17 00:15:06 +02:00
Johannes Schindelin
0e69916845 Merge branch 'gitk-and-git-gui-patches'
These are Git for Windows' Git GUI and gitk patches. We will have to
decide at some point what to do about them, but that's a little lower
priority (as Git GUI seems to be unmaintained for the time being, and
the gitk maintainer keeps a very low profile on the Git mailing list,
too).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-08-17 00:15:06 +02:00
Johannes Schindelin
9aad62b7a3 Merge branch 'ready-for-upstream'
This is the branch thicket of patches in Git for Windows that are
considered ready for upstream. To keep them in a ready-to-submit shape,
they are kept as close to the beginning of the branch thicket as
possible.
2019-08-17 00:15:05 +02:00
Johannes Schindelin
cfd1e4051e mingw: really handle SIGINT
Previously, we did not install any handler for Ctrl+C, but now we really
want to because the MSYS2 runtime learned the trick to call the
ConsoleCtrlHandler when Ctrl+C was pressed.

With this, hitting Ctrl+C while `git log` is running will only terminate
the Git process, but not the pager. This finally matches the behavior on
Linux and on macOS.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-08-17 00:15:03 +02:00