Commit Graph

121660 Commits

Author SHA1 Message Date
Johannes Schindelin
89c470c19b fixup! README.md: Add a Windows-specific preamble
This fixes a whitespace problem introduced by yours truly.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-07-13 10:36:20 +02:00
Johannes Schindelin
11896aad4e fixup! README.md: Add a Windows-specific preamble
We're now using the default branch name `main`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-07-13 10:35:51 +02:00
Johannes Schindelin
f511b78df1 fixup! README.md: Add a Windows-specific preamble
Visual Studio Code _just_ introduced a new, neat feature, where clicking
on a badge can open the repository really quickly, without having to
clone it (e.g. when fixing typos or things like that).

Let's add that badge to our README.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-07-12 17:13:47 +02:00
Johannes Schindelin
3d45ac813c Merge pull request #3309 from dscho/fsmonitor-and-unicode-paths
fsmonitor: handle non-ASCII characters in the git_dir/worktree paths
v2.32.0.windows.2
2021-07-06 09:31:10 +02:00
Johannes Schindelin
ef510a35fa Merge pull request #3264 from dscho/fix-subtree-on-windows
Fix subtree on Windows
2021-07-05 16:30:14 +02:00
Johannes Schindelin
8d1cc4476b Merge pull request #3272 from dscho/fix-duplicated-lines-when-moving-in-pager
Fix duplicated lines when scrolling in the pager
2021-07-05 15:21:07 +02:00
Johannes Schindelin
ae49c8405c fixup! mingw: support long paths
Let's allow long paths in the FSMonitor daemon, too.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-07-05 13:54:13 +02:00
Johannes Schindelin
6f50cde5df fixup! fsmonitor-fs-listen-win32: implement FSMonitor backend on Windows
Let's keep avoiding the `*A()` family of Win32 API functions because
they are susceptible to incoherent encoding problems. In Git for
Windows, we always assume paths to be UTF-8 encoded. Let's use the
dedicated helper to convert such a path to the wide character version,
and then use the `*W()` function instead.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-07-05 13:51:08 +02:00
Johannes Schindelin
f1590a75e2 Merge pull request #3297 from dscho/docs-about-testing-git-in-place
Document how to build (and test) Git for Windows
2021-06-26 22:26:53 +02:00
Johannes Schindelin
2f88978401 fixup! README.md: Add a Windows-specific preamble
Add a section instructing developers how to build, and how to test the
just-built executables in-place.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-06-25 23:25:11 +02:00
Johannes Schindelin
c0919c9ed5 Merge pull request #3293 from pascalmuller/http-support-automatically-sending-client-certificate
http: Add support for enabling automatic sending of SSL client certificate
2021-06-24 20:32:51 +02:00
Pascal Muller
c1293427d0 http: optionally send SSL client certificate
This adds support for a new http.sslAutoClientCert config value.

In cURL 7.77 or later the schannel backend does not automatically send
client certificates from the Windows Certificate Store anymore.

This config value is only used if http.sslBackend is set to "schannel",
and can be used to opt in to the old behavior and force cURL to send
client certificates.

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

Signed-off-by: Pascal Muller <pascalmuller@gmail.com>
2021-06-24 14:27:01 +02:00
Johannes Schindelin
47d568403f Merge pull request #3287 from dscho/redo-fsmonitor-null-last-update
Redo fix for FSMonitor
2021-06-21 23:24:06 +02:00
Jeff Hostetler
65a2766b34 fixup! fsmonitor: introduce core.useBuiltinFSMonitor to call the daemon via IPC
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
2021-06-21 21:29:39 +02:00
Johannes Schindelin
fe2ee68de4 pager: avoid setting COLUMNS when we're guessing its value
We query `TIOCGWINSZ` in Git to determine the correct value for
`COLUMNS`, and then set that environment variable.

If `TIOCGWINSZ` is not available, we fall back to the hard-coded value
80 _and still_ set the environment variable.

On Windows this is a problem. The reason is that Git for
Windows uses a version of `less` that relies on the MSYS2 runtime to
interact with the pseudo terminal (typically inside a MinTTY window,
which is also aware of the MSYS2 runtime). Both MinTTY and `less.exe`
interact with that pseudo terminal via `ioctl()` calls (which the MSYS2
runtime emulates even if there is no such thing on Windows).
Since https://github.com/gwsw/less/commit/bb0ee4e76c2, `less` prefers
the `COLUMNS` variable over asking ncurses itself.

But `git.exe` itself is _not_ aware of the MSYS2 runtime, or for that
matter of that pseudo terminal, and has no way to call `ioctl()` or
`TIOCGWINSZ`.

Therefore, `git.exe` will fall back to hard-coding 80 columns, no matter
what the actual terminal size is.

But `less.exe` is totally able to interact with the MSYS2 runtime and
would not actually require Git's help (which actually makes things
worse here). So let's not override `COLUMNS` on Windows.

Let's just not set `COLUMNS` unless we managed to query the actual value
from the terminal.

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

Co-authored-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-06-21 15:19:03 +02:00
Johannes Schindelin
5b320b3764 Merge pull request #3275 from dscho/monitor-libgcrypt
Monitor libgpg-error and libgcrypt versions
2021-06-17 09:30:55 +02:00
Johannes Schindelin
75f0e21527 fixup! Add a GitHub workflow to monitor component updates
Since we're now watching out for new libgcrypt versions, let's also
watch out for its dependency libgpg-error.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-06-16 13:50:14 +02:00
Johannes Schindelin
99984b34fa fixup! Add a GitHub workflow to monitor component updates
Let's watch out for new libgcrypt versions, too (this component is a
pretty important dependency of gnupg).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-06-16 13:50:14 +02:00
Johannes Schindelin
a6f7aa4048 subtree: fix assumption about the directory separator
On Windows, both forward and backslash are valid separators. In
22d5507493 (subtree: don't fuss with PATH, 2021-04-27), however, we
added code that assumes that it can only be the forward slash.

Let's fix that.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-06-14 13:49:54 +02:00
Johannes Schindelin
5f2d9434b4 subtree: fix the GIT_EXEC_PATH sanity check to work on Windows
In 22d5507493 (subtree: don't fuss with PATH, 2021-04-27), `git
subtree` was broken thoroughly on Windows.

The reason is that it assumes Unix semantics, where `PATH` is
colon-separated, and it assumes that `$GIT_EXEC_PATH:` is a verbatim
prefix of `$PATH`. Neither are true, the latter in particular because
`GIT_EXEC_PATH` is a Windows-style path, while `PATH` is a Unix-style
path list.

Let's make extra certain that `$GIT_EXEC_PATH` and the first component
of `$PATH` refer to different entities before erroring out.

We do that by using the `test <path1> -ef <path2>` command that verifies
that the inode of `<path1>` and of `<path2>` is the same.

Sadly, this construct is non-portable, according to
https://pubs.opengroup.org/onlinepubs/009695399/utilities/test.html.
However, it does not matter in practice because we still first look
whether `$GIT_EXEC_PREFIX` is string-identical to the first component of
`$PATH`. This will give us the expected result everywhere but in Git for
Windows, and Git for Windows' own Bash _does_ handle the `-ef` operator.

Just in case that we _do_ need to show the error message _and_ are
running in a shell that lacks support for `-ef`, we simply suppress the
error output for that part.

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

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-06-14 13:48:06 +02:00
Johannes Schindelin
b312fa405f Merge pull request #3263 from dscho/fix-built-in-fsmonitor
FSMonitor fixes
2021-06-09 18:05:27 +02:00
Johannes Schindelin
cfa0c45308 fixup! fsmonitor--daemon: use a cookie file to sync with file system
When the built-in FSMonitor receives an invalid v2 token, we do not
actually need to wait for a cookie file. There simply is no use for
waiting in this instance. It's not like the client will all of a sudden
realize that it sent an incorrect token and somehow make up a correct
token from thin air in a follow-up query.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-06-09 11:30:46 +02:00
Johannes Schindelin
bc40a560d3 fixup! fsmonitor: introduce core.useBuiltinFSMonitor to call the daemon via IPC
In FSMonitor v1, we made sure to only use a valid `since_token` when
querying the FSMonitor. This condition was accidentally lost in v2, and
caused segmentation faults uncovered by Scalar's Functional Tests.

I had tried to fix this in https://github.com/git-for-windows/pull/3241,
but the fix was incomplete, and I had to follow up with
https://github.com/git-for-windows/pull/3258. However, it turns out that
both of them were actually only work-arounds; I should have dug deeper
to figure out _why_ the `since_token` was no longer guaranteed not to be
`NULL`, and I finally did.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-06-09 11:30:45 +02:00
Johannes Schindelin
92392daccb fixup! fsmonitor--daemon: use a cookie file to sync with file system
When the built-in FSMonitor receives an unexpected token, we do not
actually need to wait for a cookie file. There simply is no use for
waiting in this instance. It's not like the client will all of a sudden
realize that it sent an incorrect token and somehow make up a correct
token from thin air in a follow-up query.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-06-09 11:30:45 +02:00
Johannes Schindelin
5ec07b8c4a fixup! fsmonitor--daemon: use a cookie file to sync with file system
When flushing the FSMonitor data, we do not actually need to wait for a
cookie file. In the worst case, we will over-report a bit.

If we _do_ wait for a cookie file, in the worst case we cause a hang
because the FSMonitor daemon will wait and wait even though the `.git/`
directory might be gone already.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-06-09 11:30:45 +02:00
Johannes Schindelin
7eb8372f9f fixup! fsmonitor-ipc: create client routines for git-fsmonitor--daemon
Now that we have a correct fix where we guarantee again (just like
v1 of the built-in FSMonitor) that `since_token` is not `NULL`, we can
revert the work-arounds introduced by these two PRs:

- https://github.com/git-for-windows/pull/3241

- https://github.com/git-for-windows/pull/3258

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-06-09 11:30:45 +02:00
Johannes Schindelin
4c204998d0 Merge 'readme' into HEAD
Add a README.md for GitHub goodness.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
v2.32.0.windows.1
2021-06-07 13:17:37 +02:00
Johannes Schindelin
49ab356854 Merge pull request #2837 from dscho/monitor-component-updates
Start monitoring updates of Git for Windows' component in the open
2021-06-07 13:17:36 +02:00
Johannes Schindelin
05dcc28835 Merge branch 'phase-out-reset-stdin'
This topic branch re-adds the deprecated --stdin/-z options to `git
reset`. Those patches were overridden by a different set of options in
the upstream Git project before we could propose `--stdin`.

We offered this in MinGit to applications that wanted a safer way to
pass lots of pathspecs to Git, and these applications will need to be
adjusted.

Instead of `--stdin`, `--pathspec-from-file=-` should be used, and
instead of `-z`, `--pathspec-file-nul`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-06-07 13:17:35 +02:00
Johannes Schindelin
c62914926f Merge pull request #1354 from dscho/phase-out-show-ignored-directory-gracefully
Phase out `--show-ignored-directory` gracefully
2021-06-07 13:17:35 +02:00
Johannes Schindelin
9de0986555 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>
2021-06-07 13:17:34 +02:00
Johannes Schindelin
b77e8454e6 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>
2021-06-07 13:17:34 +02:00
Johannes Schindelin
d6abe2016f Merge branch 'busybox-w32'
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-06-07 13:17:33 +02:00
Johannes Schindelin
a01ee50dc5 Merge pull request #1897 from piscisaureus/symlink-attr
Specify symlink type in .gitattributes
2021-06-07 13:17:33 +02:00
Johannes Schindelin
2d2c48a723 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>
2021-06-07 13:17:32 +02:00
Johannes Schindelin
23990c4c55 Merge branch 'kblees/kb/symlinks' 2021-06-07 13:17:32 +02:00
Johannes Schindelin
4cffb69020 Merge branch 'msys2' 2021-06-07 13:17:31 +02:00
Johannes Schindelin
4a5df48b7f Merge branch 'long-paths' 2021-06-07 13:17:30 +02:00
Johannes Schindelin
c435be679b 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>
2021-06-07 13:17:30 +02:00
Johannes Schindelin
e004dc207e 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>
2021-06-07 13:17:29 +02:00
Alejandro Barreto
9e90965ea7 Document how $HOME is set on Windows
Git documentation refers to $HOME and $XDG_CONFIG_HOME often, but does not specify how or where these values come from on Windows where neither is set by default. The new documentation reflects the behavior of setup_windows_environment() in compat/mingw.c.

Signed-off-by: Alejandro Barreto <alejandro.barreto@ni.com>
2021-06-07 13:17:29 +02:00
Johannes Schindelin
97eed41950 .github: Add configuration for the Sentiment Bot
The sentiment bot will help detect when things get too heated.
Hopefully.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-06-07 13:17:29 +02:00
Johannes Schindelin
441d61f24d Add a GitHub workflow to monitor component updates
Rather than using private IFTTT Applets that send mails to this
maintainer whenever a new version of a Git for Windows component was
released, let's use the power of GitHub workflows to make this process
publicly visible.

This workflow monitors the Atom/RSS feeds, and opens a ticket whenever a
new version was released.

Note: Bash sometimes releases multiple patched versions within a few
minutes of each other (i.e. 5.1p1 through 5.1p4, 5.0p15 and 5.0p16). The
MSYS2 runtime also has a similar system. We can address those patches as
a group, so we shouldn't get multiple issues about them.

Note further: We're not acting on newlib releases, OpenSSL alphas, Perl
release candidates or non-stable Perl releases. There's no need to open
issues about them.

Co-authored-by: Matthias Aßhauer <mha1993@live.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-06-07 13:17:28 +02:00
Johannes Schindelin
51ea1f0723 reset: reinstate support for the deprecated --stdin option
The `--stdin` option was a well-established paradigm in other commands,
therefore we implemented it in `git reset` for use by Visual Studio.

Unfortunately, upstream Git decided that it is time to introduce
`--pathspec-from-file` instead.

To keep backwards-compatibility for some grace period, we therefore
reinstate the `--stdin` option on top of the `--pathspec-from-file`
option, but mark it firmly as deprecated.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-06-07 13:17:28 +02:00
Philip Oakley
718a28ac63 Modify the GitHub Pull Request template (to reflect Git for Windows)
Git for Windows accepts pull requests; Core Git does not. Therefore we
need to adjust the template (because it only matches core Git's
project management style, not ours).

Also: direct Git for Windows enhancements to their contributions page,
space out the text for easy reading, and clarify that the mailing list
is plain text, not HTML.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-06-07 13:17:28 +02:00
Brendan Forster
75d80f37a0 Add an issue template
With improvements by Clive Chan, Adric Norris, Ben Bodenmiller and
Philip Oakley.

Helped-by: Clive Chan <cc@clive.io>
Helped-by: Adric Norris <landstander668@gmail.com>
Helped-by: Ben Bodenmiller <bbodenmiller@hotmail.com>
Helped-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Brendan Forster <brendan@github.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-06-07 13:17:28 +02:00
Johannes Schindelin
0978c1f57b README.md: Add a Windows-specific preamble
Includes touch-ups by Philip Oakley.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-06-07 13:17:28 +02:00
Derrick Stolee
a4231eab15 CONTRIBUTING.md: add guide for first-time contributors
Getting started contributing to Git can be difficult on a Windows
machine. CONTRIBUTING.md contains a guide to getting started, including
detailed steps for setting up build tools, running tests, and
submitting patches to upstream.

[includes an example by Pratik Karki how to submit v2, v3, v4, etc.]

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
2021-06-07 13:17:28 +02:00
Johannes Schindelin
06ef6974ef Modify the Code of Conduct for Git for Windows
The Git project followed suite and added their Code of Conduct, based on
the Contributors' Covenant v1.4.

We edit it slightly to reflect Git for Windows' particulars.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-06-07 13:17:28 +02:00
Johannes Schindelin
35f7c6d557 status: reinstate --show-ignored-directory as a deprecated option
It was a bad idea to just remove that option from Git for Windows
v2.15.0, as early users of that (still experimental) option would have
been puzzled what they are supposed to do now.

So let's reintroduce the flag, but make sure to show the user good
advice how to fix this going forward.

We'll remove this option in a more orderly fashion when we're certain
that the option is no longer used (previous Visual Studio versions
relied on it).

The option is deprecated now, therefore we make sure that keeps saying
so until we finally remove it.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2021-06-07 13:17:27 +02:00