Commit Graph

132458 Commits

Author SHA1 Message Date
Derrick Stolee
6958235be5 Merge pull request #3791: Various fixes around safe.directory
The first three commits are rebased versions of those in gitgitgadget/git#1215. These allow the following:

1. Fix `git config --global foo.bar <path>` from allowing the `<path>`. As a bonus, users with a config value starting with `/` will not get a warning about "old-style" paths needing a "`%(prefix)/`".

2. When in WSL, the path starts with `/` so it needs to be interpolated properly. Update the warning to include `%(prefix)/` to get the right value for WSL users. (This is specifically for using Git for Windows from Git Bash, but in a WSL directory.)

3. When using WSL, the ownership check fails and reports an error message. This is noisy, and happens even if the user has marked the path with `safe.directory`. Remove that error message.
2022-05-09 12:30:38 +02:00
Victoria Dye
515e56434f Merge branch 'safe.directory-and-windows'
These two patches made it into Git for Windows v2.35.2, but not into Git
v2.35.2.

Signed-off-by: Victoria Dye <vdye@github.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2022-05-09 12:28:30 +02:00
Johannes Schindelin
913b52fd7a Merge pull request #3708 from PhilipOakley/die_preserve
Update the die() preserve-merges messages to help some users
2022-05-09 12:28:30 +02:00
Victoria Dye
873560441d Merge branch 'ns-batch-fsync' into HEAD 2022-05-09 12:28:30 +02:00
Johannes Schindelin
1926b98a26 Merge pull request #3533 from PhilipOakley/hashliteral_t
Begin `unsigned long`->`size_t` conversion to support large files on Windows
2022-05-09 12:28:30 +02:00
Jeff Hostetler
b8a3dfda2a Merge branch 'mark-v4-fsmonitor-experimental' into try-v4-fsmonitor 2022-05-09 12:28:29 +02:00
Jeff Hostetler
4b13794e0e Merge branch 'trial-fsmonitor-march-2022-part3' into trial-fsmonitor-march-2022 2022-05-09 12:28:29 +02:00
Johannes Schindelin
34f66fe668 Merge pull request #3417 from dscho/initialize-core.symlinks-earlier
init: respect core.symlinks before copying the templates
2022-05-09 12:28:29 +02:00
Johannes Schindelin
5e0d83d709 Merge pull request #3306 from PhilipOakley/vs-sln
Make Git for Windows start builds in modern Visual Studio
2022-05-09 12:28:29 +02:00
Johannes Schindelin
4ac6f25288 Merge pull request #3349 from vdye/feature/ci-subtree-tests
Add `contrib/subtree` test execution to CI builds
2022-05-09 12:28:28 +02:00
Johannes Schindelin
3d8ea10e47 Merge pull request #3293 from pascalmuller/http-support-automatically-sending-client-certificate
http: Add support for enabling automatic sending of SSL client certificate
2022-05-09 12:28:28 +02:00
Johannes Schindelin
c211d6ec62 Merge pull request #3220 from dscho/there-is-no-vs/master-anymore
Let the documentation reflect that there is no vs/master anymore
2022-05-09 12:28:28 +02:00
Johannes Schindelin
cc6e5a3c6a Merge pull request #3165 from dscho/increase-allowed-length-of-interpreter-path
mingw: allow for longer paths in `parse_interpreter()`
2022-05-09 12:28:28 +02:00
Johannes Schindelin
4f27f013e4 Merge pull request #3150 from dscho/ci-cache-vcpkg-artifacts-g4w
ci: cache vcpkg artifacts
2022-05-09 12:28:28 +02:00
Johannes Schindelin
cd963a4c95 Merge pull request #3327 from dennisameling/fix-host-cpu
cmake(): allow setting HOST_CPU for cross-compilation
2022-05-09 12:28:27 +02:00
Johannes Schindelin
0e44b068cc Merge pull request #2915 from dennisameling/windows-arm64-support
Windows arm64 support
2022-05-09 12:28:27 +02:00
Johannes Schindelin
d4f3731c3e Merge pull request #2351 from PhilipOakley/vcpkg-tip
Vcpkg Install: detect lack of working Git, and note possible vcpkg time outs
2022-05-09 12:28:27 +02:00
Johannes Schindelin
221cc9703f Merge pull request #2974 from derrickstolee/maintenance-and-headless
Include Windows-specific maintenance and headless-git
2022-05-09 12:28:27 +02:00
Johannes Schindelin
dc23b01053 Merge 'git-gui/js/intent-to-add'
This merges the current version of the patch that tries to address Git
GUI's problems with intent-to-add files.

This patch will likely be improved substantially before it is merged
into Git GUI's main branch, but we want to have _something_ resembling a
fix already in Git for Windows v2.29.0.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2022-05-09 12:28:26 +02:00
Johannes Schindelin
8d2d914d5a Merge pull request #2655 from jglathe/jg/t0014_trace_extra_info
t/t0014: fix: eliminate additional lines from trace
2022-05-09 12:28:26 +02:00
Johannes Schindelin
4cf5379e46 Merge pull request #2714 from lbonanomi/main
Rationalize line endings for scissors-cleanup
2022-05-09 12:28:26 +02:00
Johannes Schindelin
f77ab5a6e4 Merge pull request #2730 from dscho/crlf-aware-git-add-i
git add -i: handle CR/LF line endings in the interactive input
2022-05-09 12:28:26 +02:00
Johannes Schindelin
9ea0600bf7 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>
2022-05-09 12:28:25 +02:00
Johannes Schindelin
948033340a Merge pull request #2618 from dscho/avoid-d/f-conflict-in-vs/master
ci: avoid d/f conflict in vs/master
2022-05-09 12:28:25 +02:00
Johannes Schindelin
fe2c605ac9 Merge pull request #2535 from dscho/schannel-revoke-best-effort
Introduce and use the new "best effort" strategy for Secure Channel revoke checking
2022-05-09 12:28:25 +02:00
Johannes Schindelin
de21dcf654 Merge pull request #2506 from dscho/issue-2283
Allow running Git directly from `C:\Program Files\Git\mingw64\bin\git.exe`
2022-05-09 12:28:25 +02:00
Johannes Schindelin
a932826c23 Merge pull request #2504 from dscho/access-repo-via-junction
Handle `git add <file>` where <file> traverses an NTFS junction
2022-05-09 12:28:25 +02:00
Johannes Schindelin
c2803588ab Merge pull request #2501 from jeffhostetler/clink-debug-curl
clink.pl: fix MSVC compile script to handle libcurl-d.lib
2022-05-09 12:28:24 +02:00
Johannes Schindelin
9d3b3689e6 Merge pull request #2488 from bmueller84/master
mingw: fix fatal error working on mapped network drives on Windows
2022-05-09 12:28:24 +02:00
Johannes Schindelin
cb06981fa3 Merge pull request #2449 from dscho/mingw-getcwd-and-symlinks
Do resolve symlinks in `getcwd()`
2022-05-09 12:28:24 +02:00
Johannes Schindelin
1a4db65cf0 Merge pull request #2405 from dscho/mingw-setsockopt
Make sure `errno` is set when socket operations fail
2022-05-09 12:28:24 +02:00
Johannes Schindelin
adaa5b6642 Merge pull request #2375 from assarbad/reintroduce-sideband-config
Config option to disable side-band-64k for transport
2022-05-09 12:28:23 +02:00
Johannes Schindelin
dbd1328ba8 Merge branch 'msys2-python'
In MSYS2, we have two Python interpreters at our disposal, so we can
include the Python stuff in the build.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2022-05-09 12:28:23 +02:00
Johannes Schindelin
fe44de6a05 Merge branch 'dont-clean-junctions'
This topic branch teaches `git clean` to respect NTFS junctions and Unix
bind mounts: it will now stop at those boundaries.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2022-05-09 12:28:23 +02:00
Johannes Schindelin
3ab117a641 Merge pull request #2170 from dscho/gitk-long-cmdline
Fix gitk (long cmdline)
2022-05-09 12:28:23 +02:00
Johannes Schindelin
c85a7f8a7d Merge branch 'fsync-object-files-always'
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2022-05-09 12:28:22 +02:00
Johannes Schindelin
5f85f8fd06 Merge branch 'dont-spawn-gzip-in-archive'
This topic branch avoids spawning `gzip` when asking `git archive` to
create `.tar.gz` files.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2022-05-09 12:28:22 +02:00
Johannes Schindelin
977cf3df04 Merge branch 'drive-prefix'
This topic branch allows us to specify absolute paths without the drive
prefix e.g. when cloning.

Example:

	C:\Users\me> git clone https://github.com/git/git \upstream-git

This will clone into a new directory C:\upstream-git, in line with how
Windows interprets absolute paths.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2022-05-09 12:28:22 +02:00
Johannes Schindelin
edf0bb333e 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>
2022-05-09 12:28:22 +02:00
Derrick Stolee
3f1c22a61c compat/mingw.c: do not warn when failing to get owner
In the case of Git for Windows (say, in a Git Bash window) running in a
Windows Subsystem for Linux (WSL) directory, the GetNamedSecurityInfoW()
call in is_path_owned_By_current_side() returns an error code other than
ERROR_SUCCESS. This is consistent behavior across this boundary.

In these cases, the owner would always be different because the WSL
owner is a different entity than the Windows user.

The change here is to suppress the error message that looks like this:

  error: failed to get owner for '//wsl.localhost/...' (1)

Before this change, this warning happens for every Git command,
regardless of whether the directory is marked with safe.directory.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
2022-05-09 12:28:21 +02:00
Johannes Schindelin
04c37dd668 mingw: handle a file owned by the Administrators group correctly
When an Administrator creates a file or directory, the created
file/directory is owned not by the Administrator SID, but by the
_Administrators Group_ SID. The reason is that users with administrator
privileges usually run in unprivileged ("non-elevated") mode, and their
user SID does not change when running in elevated mode.

This is is relevant e.g. when running a GitHub workflow on a build
agent, which runs in elevated mode: cloning a Git repository in a script
step will cause the worktree to be owned by the Administrators Group
SID, for example.

Let's handle this case as following: if the current user is an
administrator, Git should consider a worktree owned by the
Administrators Group as if it were owned by said user.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2022-05-09 12:28:21 +02:00
Derrick Stolee
8494403e87 setup: properly use "%(prefix)/" when in WSL
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
2022-05-09 12:28:21 +02:00
Philip Oakley
79de36bd6e rebase: preserve is also a pull option, tell dying users
The `--preserve-merges` option was removed by v2.35.0. However
users may not be aware that it is also a Pull option, and it is
still offered by major IDE vendors such as Visual Studio.

Extend the `--preserve-merges` die message to direct users to
this option and it's locations.

Signed-off-by: Philip Oakley <philipoakley@iee.email>
2022-05-09 12:28:20 +02:00
Neeraj Singh
84a880ff39 core.fsyncmethod: performance tests for batch mode
Add basic performance tests for git commands that can add data to the
object database. We cover:
* git add
* git stash
* git update-index (via git stash)
* git unpack-objects
* git commit --all

We cover all currently available fsync methods as well.

Signed-off-by: Neeraj Singh <neerajsi@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-05-09 12:28:20 +02:00
Johannes Schindelin
2d90a1e810 Allow debugging unsafe directories' ownership
When Git refuses to use an existing repository because it is owned by
someone else than the current user, it can be a bit tricky on Windows to
figure out what is going on.

Let's help with that by offering some more information via the
environment variable `GIT_TEST_DEBUG_UNSAFE_DIRECTORIES`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2022-05-09 12:28:20 +02:00
Philip Oakley
bb64d79c22 rebase: help user when dying with preserve-merges`
Git will die if a "rebase --preserve-merges" is in progress.
Users cannot --quit, --abort or --continue the rebase.

This sceario can occur if the user updates their Git, or switches
to another newer version, after starting a preserve-merges rebase,
commonly via the pull setting.

One trigger is an unexpectedly difficult to resolve conflict, as
reported on the `git-users` group.
(https://groups.google.com/g/git-for-windows/c/3jMWbBlXXHM)

Tell the user the cause, i.e. the existence of the directory.
The problem must be resolved manually, `git rebase --<option>`
commands will die, or the user must downgrade. Also, note that
the deleted options are no longer shown in the documentation.

Signed-off-by: Philip Oakley <philipoakley@iee.email>
2022-05-09 12:28:20 +02:00
Neeraj Singh
01ce842be8 t/perf: add iteration setup mechanism to perf-lib
Tests that affect the repo in stateful ways are easier to write if we
can run setup steps outside of the measured portion of perf iteration.

This change adds a "--setup 'setup-script'" parameter to test_perf. To
make invocations easier to understand, I also moved the prerequisites to
a new --prereq parameter.

The setup facility will be used in the upcoming perf tests for batch
mode, but it already helps in some existing tests, like t5302 and t7820.

Signed-off-by: Neeraj Singh <neerajsi@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-05-09 12:28:20 +02:00
Neeraj Singh
67c089638f core.fsyncmethod: tests for batch mode
Add test cases to exercise batch mode for:
 * 'git add'
 * 'git stash'
 * 'git update-index'
 * 'git unpack-objects'

These tests ensure that the added data winds up in the object database.

In this change we introduce a new test helper lib-unique-files.sh. The
goal of this library is to create a tree of files that have different
oids from any other files that may have been created in the current test
repo. This helps us avoid missing validation of an object being added
due to it already being in the repo.

Signed-off-by: Neeraj Singh <neerajsi@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-05-09 12:28:20 +02:00
Neeraj Singh
c6643318fe test-lib-functions: add parsing helpers for ls-files and ls-tree
Several tests use awk to parse OIDs from the output of 'git ls-files
--stage' and 'git ls-tree'. Introduce helpers to centralize these uses
of awk.

Update t5317-pack-objects-filter-objects.sh to use the new ls-files
helper so that it has some usages to review. Other updates are left for
the future.

Signed-off-by: Neeraj Singh <neerajsi@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-05-09 12:28:20 +02:00
Neeraj Singh
b998c8851c core.fsync: use batch mode and sync loose objects by default on Windows
Git for Windows has defaulted to core.fsyncObjectFiles=true since
September 2017. We turn on syncing of loose object files with batch mode
in upstream Git so that we can get broad coverage of the new code
upstream.

We don't actually do fsyncs in the most of the test suite, since
GIT_TEST_FSYNC is set to 0. However, we do exercise all of the
surrounding batch mode code since GIT_TEST_FSYNC merely makes the
maybe_fsync wrapper always appear to succeed.

Signed-off-by: Neeraj Singh <neerajsi@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-05-09 12:28:20 +02:00