Commit Graph

105654 Commits

Author SHA1 Message Date
Alejandro Barreto
7a49cbcc4e 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>
2020-01-03 20:54:51 +01:00
Johannes Schindelin
804f9e770e .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>
2020-01-03 20:54:51 +01:00
Philip Oakley
87abd61dea 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>
2020-01-03 20:54:50 +01:00
Brendan Forster
3d422283db 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>
2020-01-03 20:54:50 +01:00
Johannes Schindelin
75679228e7 README.md: Add a Windows-specific preamble
Includes touch-ups by Philip Oakley.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2020-01-03 20:54:50 +01:00
Derrick Stolee
7896598e61 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>
2020-01-03 20:54:50 +01:00
Johannes Schindelin
28ae2841f1 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>
2020-01-03 20:54:50 +01:00
Johannes Schindelin
8857bb52ec Start the merging-rebase to v2.25.0-rc1
This commit starts the rebase of 3ee5f1f885 to d5b9efb81ba
2020-01-03 20:45:22 +01:00
Johannes Schindelin
8fc9b8676b Merge pull request #2437 from dscho/only-error-on-backslash-in-index
Disallow writing, but not fetching commits with file names containing backslashes
2020-01-03 20:41:38 +01:00
Johannes Schindelin
0c54f76894 Merge pull request #2449 from dscho/mingw-getcwd-and-symlinks
Do resolve symlinks in `getcwd()`
2020-01-03 20:34:06 +01:00
Junio C Hamano
8679ef24ed Git 2.25-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-01-02 12:38:30 -08:00
Junio C Hamano
a82027e9e6 Merge branch 'js/use-test-tool-on-path'
Test fix.

* js/use-test-tool-on-path:
  t3008: find test-tool through path lookup
2020-01-02 12:38:30 -08:00
Junio C Hamano
13432fc6dd Merge branch 'js/mingw-reserved-filenames'
Forbid pathnames that the platform's filesystem cannot represent on
MinGW.

* js/mingw-reserved-filenames:
  mingw: refuse paths containing reserved names
  mingw: short-circuit the conversion of `/dev/null` to UTF-16
2020-01-02 12:38:30 -08:00
Junio C Hamano
e0e1ac5db0 Merge branch 'en/rebase-signoff-fix'
"git rebase --signoff" stopped working when the command was written
in C, which has been corrected.

* en/rebase-signoff-fix:
  rebase: fix saving of --signoff state for am-based rebases
2020-01-02 12:38:30 -08:00
Junio C Hamano
b76a244c9d Merge branch 'em/freebsd-cirrus-ci'
* em/freebsd-cirrus-ci:
  CI: add FreeBSD CI support via Cirrus-CI
2020-01-02 12:38:29 -08:00
Junio C Hamano
bc855232bc Merge branch 'bk/p4-misc-usability'
Miscellaneous small UX improvements on "git-p4".

* bk/p4-misc-usability:
  git-p4: show detailed help when parsing options fail
  git-p4: yes/no prompts should sanitize user text
2020-01-02 12:38:29 -08:00
Johannes Schindelin
8afef17373 mingw: do resolve symlinks in getcwd()
As pointed out in https://github.com/git-for-windows/git/issues/1676,
the `git rev-parse --is-inside-work-tree` command currently fails when
the current directory's path contains symbolic links.

The underlying reason for this bug is that `getcwd()` is supposed to
resolve symbolic links, but our `mingw_getcwd()` implementation did not.

We do have all the building blocks for that, though: the
`GetFinalPathByHandleW()` function will resolve symbolic links. However,
we only called that function if `GetLongPathNameW()` failed, for
historical reasons: the latter function was supported for a long time,
but the former API function was introduced only with Windows Vista, and
we used to support also Windows XP. With that support having been
dropped, we are free to call the symbolic link-resolving function right
away.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2020-01-01 21:07:22 +01:00
Johannes Sixt
20a67e8ce9 t3008: find test-tool through path lookup
Do not use $GIT_BUILD_DIR without quotes; it may contain spaces and be
split into fields. But it is not necessary to access test-tool with an
absolute path in the first place as it can be found via path lookup.
Remove the explicit path.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-12-27 14:15:01 -08:00
Johannes Schindelin
2249a76fa1 Merge 'readme' into HEAD
Add a README.md for GitHub goodness.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
v2.25.0-rc0.windows.1
2019-12-27 09:26:30 +01:00
Johannes Schindelin
53f13ea32a Merge pull request #1354 from dscho/phase-out-show-ignored-directory-gracefully
Phase out `--show-ignored-directory` gracefully
2019-12-27 09:26:29 +01:00
Johannes Schindelin
9551b5a0be 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-12-27 09:26:28 +01:00
Johannes Schindelin
9dd2877d32 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-12-27 09:26:28 +01:00
Johannes Schindelin
aa2ed60cae Merge branch 'busybox-w32'
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-12-27 09:26:27 +01:00
Johannes Schindelin
94cde609ec Merge pull request #1897 from piscisaureus/symlink-attr
Specify symlink type in .gitattributes
2019-12-27 09:26:26 +01:00
Johannes Schindelin
c229d4d3fa 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-12-27 09:26:26 +01:00
Johannes Schindelin
5d455f453f Merge branch 'kblees/kb/symlinks' 2019-12-27 09:26:25 +01:00
Johannes Schindelin
38159a0ad6 Merge branch 'msys2' 2019-12-27 09:26:25 +01:00
Johannes Schindelin
baa71f4be3 Merge branch 'long-paths' 2019-12-27 09:26:24 +01:00
Johannes Schindelin
6021631447 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-12-27 09:26:23 +01:00
Derrick Stolee
82dc309682 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-12-27 09:26:23 +01:00
Johannes Schindelin
ee695f37d4 Merge pull request #1937 from benpeart/fscache-NtQueryDirectoryFile-gfw
fscache: teach fscache to use NtQueryDirectoryFile
2019-12-27 09:26:22 +01:00
Johannes Schindelin
89d6ed6119 Merge pull request #1934 from benpeart/fscache-thread-safe-enable-gfw
fscache: make fscache_enable() thread safe
2019-12-27 09:26:22 +01:00
Johannes Schindelin
65d07ba525 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-12-27 09:26:22 +01:00
Johannes Schindelin
8a8eac385f Merge pull request #1910 from benpeart/fscache_statistics-gfw
fscache: add fscache hit statistics
2019-12-27 09:26:21 +01:00
Johannes Schindelin
73ee893b1e Merge pull request #1914 from benpeart/free-fscache-after-add-gfw
At the end of the add command, disable and free the fscache
2019-12-27 09:26:20 +01:00
Johannes Schindelin
ce52d8d04e Merge pull request #1911 from benpeart/git_test_fscache-gfw
fscache: add GIT_TEST_FSCACHE support
2019-12-27 09:26:20 +01:00
Johannes Schindelin
7aa3a5338e Merge pull request #1909 from benpeart/free-fscache-after-status-gfw
status: disable and free fscache at the end of the status command
2019-12-27 09:26:19 +01:00
Johannes Schindelin
c8fa3c784d Merge pull request #1908 from benpeart/FindFirstFileEx-gfw
fscache: use FindFirstFileExW to avoid retrieving the short name
2019-12-27 09:26:19 +01:00
Johannes Schindelin
39f0ed019f Merge pull request #1827 from benpeart/fscache_refresh_index
Enable the filesystem cache (fscache) in refresh_index().
2019-12-27 09:26:19 +01:00
Johannes Schindelin
f89742986d 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-12-27 09:26:18 +01:00
Johannes Schindelin
67e5f7bb5e Merge pull request #1426 from atetubou/fetch_pack
fetch-pack.c: enable fscache for stats under .git/objects
2019-12-27 09:26:18 +01:00
Johannes Schindelin
a0d9b4dba9 Merge pull request #1344 from jeffhostetler/perf_add_excludes_with_fscache
dir.c: make add_excludes aware of fscache during status
2019-12-27 09:26:17 +01:00
Johannes Schindelin
1625ac7200 Merge pull request #971 from jeffhostetler/jeffhostetler/add_preload_fscache
add: use preload-index and fscache for performance
2019-12-27 09:26:17 +01:00
Johannes Schindelin
1439cd1d58 Merge pull request #994 from jeffhostetler/jeffhostetler/fscache_nfd
fscache: add not-found directory cache to fscache
2019-12-27 09:26:16 +01:00
Johannes Schindelin
d21fe44415 Merge branch 'fscache' 2019-12-27 09:26:16 +01:00
Johannes Schindelin
60be411c6c 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-12-27 09:26:15 +01:00
Johannes Schindelin
e940b61e51 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-12-27 09:26:14 +01:00
Johannes Schindelin
31bf0164d4 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-12-27 09:26:14 +01:00
Johannes Schindelin
b292f98cf3 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-12-27 09:26:11 +01:00
Johannes Schindelin
32af6041d9 mingw: add a Makefile target to copy test artifacts
The Makefile target `install-mingit-test-artifacts` simply copies stuff
and things directly into a MinGit directory, including an init.bat
script to set everything up so that the tests can be run in a cmd
window.

Sadly, Git's test suite still relies on a Perl interpreter even if
compiled with NO_PERL=YesPlease. We punt for now, installing a small
script into /usr/bin/perl that hands off to an existing Perl of a Git
for Windows SDK.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-12-27 09:26:11 +01:00