Commit Graph

122243 Commits

Author SHA1 Message Date
Johannes Schindelin
b9cd00a09c Merge pull request #3017 from dennisameling/add-arm64-artifacts
git-artifacts: add ARM64 artifacts
2021-08-03 17:20:40 +02:00
Johannes Schindelin
c686c0ea60 Merge pull request #2586 from dscho/build-git-artifacts
Add a GitHub workflow to generate Git for Windows' installer, portable Git, MinGit, etc
2021-08-03 17:20:39 +02:00
Johannes Schindelin
741effdb83 Merge pull request #2915 from dennisameling/windows-arm64-support
Windows arm64 support
2021-08-03 17:20:39 +02:00
Johannes Schindelin
bf3620025d Merge pull request #2351 from PhilipOakley/vcpkg-tip
Vcpkg Install: detect lack of working Git, and note possible vcpkg time outs
2021-08-03 17:20:38 +02:00
Johannes Schindelin
f90ad9bd0a Merge pull request #2974 from derrickstolee/maintenance-and-headless
Include Windows-specific maintenance and headless-git
2021-08-03 17:20:38 +02:00
Johannes Schindelin
82b4e03931 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>
2021-08-03 17:20:37 +02:00
Johannes Schindelin
335dd33829 Merge pull request #2655 from jglathe/jg/t0014_trace_extra_info
t/t0014: fix: eliminate additional lines from trace
2021-08-03 17:20:37 +02:00
Johannes Schindelin
74dd57c7df Merge pull request #2714 from lbonanomi/main
Rationalize line endings for scissors-cleanup
2021-08-03 17:20:36 +02:00
Johannes Schindelin
6592b3ecaa Merge pull request #2730 from dscho/crlf-aware-git-add-i
git add -i: handle CR/LF line endings in the interactive input
2021-08-03 17:20:35 +02:00
Johannes Schindelin
af50bbd4c4 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>
2021-08-03 17:20:35 +02:00
Johannes Schindelin
ded294a24d Merge pull request #2618 from dscho/avoid-d/f-conflict-in-vs/master
ci: avoid d/f conflict in vs/master
2021-08-03 17:20:34 +02:00
Johannes Schindelin
71480dbab0 Merge pull request #2535 from dscho/schannel-revoke-best-effort
Introduce and use the new "best effort" strategy for Secure Channel revoke checking
2021-08-03 17:20:34 +02:00
Johannes Schindelin
6cfddc16cc Merge pull request #2506 from dscho/issue-2283
Allow running Git directly from `C:\Program Files\Git\mingw64\bin\git.exe`
2021-08-03 17:20:33 +02:00
Johannes Schindelin
a8db334564 Merge pull request #2504 from dscho/access-repo-via-junction
Handle `git add <file>` where <file> traverses an NTFS junction
2021-08-03 17:20:33 +02:00
Johannes Schindelin
4bd21cd464 Merge pull request #2501 from jeffhostetler/clink-debug-curl
clink.pl: fix MSVC compile script to handle libcurl-d.lib
2021-08-03 17:20:32 +02:00
Johannes Schindelin
059e5f4961 Merge pull request #2488 from bmueller84/master
mingw: fix fatal error working on mapped network drives on Windows
2021-08-03 17:20:32 +02:00
Johannes Schindelin
f3acb841e5 Merge pull request #2449 from dscho/mingw-getcwd-and-symlinks
Do resolve symlinks in `getcwd()`
2021-08-03 17:20:31 +02:00
Johannes Schindelin
e2584594fa Merge pull request #2405 from dscho/mingw-setsockopt
Make sure `errno` is set when socket operations fail
2021-08-03 17:20:31 +02:00
Johannes Schindelin
dcf4603310 Merge pull request #2375 from assarbad/reintroduce-sideband-config
Config option to disable side-band-64k for transport
2021-08-03 17:20:30 +02:00
Johannes Schindelin
be65021851 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>
2021-08-03 17:20:30 +02:00
Johannes Schindelin
dd7f43b77b 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>
2021-08-03 17:20:29 +02:00
Johannes Schindelin
1a2d9d63eb Merge pull request #2170 from dscho/gitk-long-cmdline
Fix gitk (long cmdline)
2021-08-03 17:20:28 +02:00
Johannes Schindelin
60f049d337 Merge branch 'fsync-object-files-always'
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-08-03 17:20:28 +02:00
Johannes Schindelin
603324e1ca 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>
2021-08-03 17:20:28 +02:00
Johannes Schindelin
71fa54fbbd Merge branch 'mingw-expand-absolute-user-path'
When compiling Git with a runtime prefix (so that it can be installed
into any location, finding its libexec/ directory relative to the
location of the `git` executable), it is convenient to provide
"absolute" Unix-y paths e.g. for http.sslCAInfo, and have those absolute
paths be resolved relative to the runtime prefix.

This patch makes it so for Windows. It is up for discussion whether we
want this for other platforms, too, as long as building with
RUNTIME_PREFIX.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-08-03 17:20:27 +02:00
Johannes Schindelin
1c9f33eea5 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>
2021-08-03 17:20:27 +02:00
Johannes Schindelin
bbeaf74544 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>
2021-08-03 17:20:26 +02:00
Dennis Ameling
108a1f2742 git-artifacts: add ARM64 artifacts
Adds ARM64 artifacts to the git-artifacts GitHub Action workflow.

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-08-03 17:20:09 +02:00
Johannes Schindelin
9e8fab82f4 git-artifacts: use the cached build-installers instead of makepkg-git
When building the Pacman packages, we technically do not need the full
`build-installers` artifact (which is substantially larger than the
`makepkg-git` artifact). However, the former is already cached and
includes the latter's files. And it is _so_ much faster to download the
cached (larger) artifact than to download the smaller `makepkg-git`
artifact from Azure Pipelines.

Suggested-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-08-03 17:20:08 +02:00
Dennis Ameling
7c8a865ee1 git-artifacts: cache the build-installers artifact
It is a bit expensive to fetch just the git-sdk-64-build-installers
artifact from Azure Pipelines and then to unpack it (takes some 6-7
minutes, typically). Let's cache it if possible.

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-08-03 17:20:08 +02:00
Johannes Schindelin
ba0678266a git-artifacts: allow specifying repo/ref via workflow_dispatch
With this change, users can specify the branch and repository from which
they want to build Git for Windows' artifacts, via the `ref` and
`repository` inputs.

This allows e.g. building `refs/heads/seen` of `git/git` (even if no
`git-artifacts` workflow is configured in that repository), or
`refs/pull/<number>/merge` for a given Pull Request.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-08-03 17:20:08 +02:00
Johannes Schindelin
5feb61d11b git-artifacts: allow restricting which artifacts are built
Users can now specify which artifacts they want to build, via the
`build_only` input, which is a space-separated list of artifacts. For
example, `installer portable` will build `installer-x86_64`,
`installer-i686`, `portable-x86_64` and `portable-i686`, and an empty or
unset value will build all artifacts.

Please note that the `mingw-w64-git` packages are built always, as it
would be tricky to figure out when they need to be built (for example,
`build_only=portable-x86_64` technically does not need `pkg-i686` to be
built, while `build_only=portable` does).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-08-03 17:20:07 +02:00
Johannes Schindelin
d55320211b git-artifacts: also build the nuget package
The two NuGet artifact exists only in the 64-bit version. So let's make
them in a separate, non-matrix job.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-08-03 17:20:07 +02:00
Johannes Schindelin
4ce098ba3c git-artifacts: also build 32-bit versions
Just in case that we need to generate those real quick.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-08-03 17:20:07 +02:00
Johannes Schindelin
d6e9891c6c git-artifacts: also build portable, mingit and mingit-busybox
... because we can.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-08-03 17:20:07 +02:00
Johannes Schindelin
fbc4839bef git-artifacts: also build the installer
While at it, we might just as well build the Git for Windows installer
;-)

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-08-03 17:20:07 +02:00
Johannes Schindelin
8fc373219c git-artifacts: also code-sign, if configured via the secrets
When the secrets `CODESIGN_P12` and `CODESIGN_PASS` are set, the
workflow will now code-sign the `.exe` files contained in the package.

This should help with a few anti-malware programs, at least when the
certificate saw some action and gained trust.

Note: `CODESIGN_P12` needs to be generated via

	cat <certificate>.p12 | base64 | tr '\n' %

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-08-03 17:20:06 +02:00
Johannes Schindelin
62f8c06d41 git-artifacts: if GPG secrets are available, use them
This expects the `GPGKEY` and `PRIVGPGKEY` secrets to be set in the
respective GitHub repository.

The `GPGKEY` value should be of the form

	<short-key> --passphrase <pass> --yes --batch --no-tty --pinentry-mode loopback --digest-algo SHA256

and the `PRIVGPGKEY` should be generated via

	gpg --export-secret-keys | base64 | tr '\n' %

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-08-03 17:20:06 +02:00
Johannes Schindelin
786f082f27 Add a GitHub workflow to generate Git for Windows' Pacman package
Git for Windows uses MSYS2 as base system, and therefore the Git
binaries are bundled as Pacman package.

This workflow allows building the 64-bit version of this package (which
is called `mingw-w64-x86_64-git`).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-08-03 17:20:06 +02:00
Dennis Ameling
58ff5ff711 Add schannel to curl installation
Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
2021-08-03 17:20:05 +02:00
Dennis Ameling
0bb6fea9ea ci(vs-build) also build Windows/ARM64 artifacts
There are no Windows/ARM64 agents in GitHub Actions yet, therefore we
just skip adjusting the `vs-test` job for now.

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-08-03 17:20:05 +02:00
Dennis Ameling
da7d0a8882 cmake: allow building for Windows/ARM64
Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-08-03 17:19:58 +02:00
Ian Bearman
b86c405e4d vcbuild: add an option to install individual 'features'
In this context, a "feature" is a dependency combined with its own
dependencies.

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-08-03 17:19:23 +02:00
Ian Bearman
e9565a80bd vcbuild: install ARM64 dependencies when building ARM64 binaries
Co-authored-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Ian Bearman <ianb@microsoft.com>
Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-08-03 17:19:23 +02:00
Ian Bearman
b3f07452ae vcxproj: support building Windows/ARM64 binaries
Signed-off-by: Ian Bearman <ianb@microsoft.com>
Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-08-03 17:19:23 +02:00
Philip Oakley
ef03e945e3 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>
2021-08-03 17:19:22 +02:00
Philip Oakley
41bcafc611 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>
2021-08-03 17:19:22 +02:00
Johannes Schindelin
0d42c4e086 git maintenance: avoid console window in scheduled tasks on Windows
We just introduced a helper to avoid showing a console window when the
scheduled task runs `git.exe`. Let's actually use it.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
2021-08-03 17:17:15 +02:00
Johannes Schindelin
95a4235b57 win32: add a helper to run git.exe without a foreground window
On Windows, there are two kinds of executables, console ones and
non-console ones. Git's executables are all console ones.

When launching the former e.g. in a scheduled task, a CMD window pops
up. This is not what we want for the tasks installed via the `git
maintenance` command.

To work around this, let's introduce `headless-git.exe`, which is a
non-console program that does _not_ pop up any window. All it does is to
re-launch `git.exe`, suppressing that console window, passing through
all command-line arguments as-are.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
2021-08-03 17:17:14 +02:00
Johannes Schindelin
fb98a935a3 vcxproj: handle GUI programs, too
So far, we only built Console programs, but we are about to introduce a
program that targets the Windows subsystem (i.e. it is a so-called "GUI"
program).

Let's handle this preemptively in the script that generates the Visual
Studio files.

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