Commit Graph

107554 Commits

Author SHA1 Message Date
Johannes Schindelin
2cada89591 Always auto-gc after calling a fast-import transport
After importing anything with fast-import, we should always let the
garbage collector do its job, since the objects are written to disk
inefficiently.

This brings down an initial import of http://selenic.com/hg from about
230 megabytes to about 14.

In the future, we may want to make this configurable on a per-remote
basis, or maybe teach fast-import about it in the first place.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2020-03-10 20:39:31 +01:00
Sverre Rabbelier
59f5f4b7f1 remote-helper: check helper status after import/export
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
2020-03-10 20:39:31 +01:00
Sverre Rabbelier
1cc5a7d19e transport-helper: add trailing --
[PT: ensure we add an additional element to the argv array]

Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2020-03-10 20:39:31 +01:00
Sverre Rabbelier
42c25304a7 t9350: point out that refs are not updated correctly
This happens only when the corresponding commits are not exported in
the current fast-export run. This can happen either when the relevant
commit is already marked, or when the commit is explicitly marked
as UNINTERESTING with a negative ref by another argument.

This breaks fast-export basec remote helpers.

Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
2020-03-10 20:39:31 +01:00
Johannes Schindelin
5abc82c39a Start the merging-rebase to v2.26.0-rc1
This commit starts the rebase of 9bf8b40776 to f8a33c0377c
2020-03-10 20:39:30 +01:00
Junio C Hamano
b4374e96c8 Git 2.26-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-03-09 11:21:21 -07:00
Junio C Hamano
4a5c3e10f2 Merge branch 'rs/show-progress-in-dumb-http-fetch'
"git fetch" over HTTP walker protocol did not show any progress
output.  We inherently do not know how much work remains, but still
we can show something not to bore users.

* rs/show-progress-in-dumb-http-fetch:
  remote-curl: show progress for fetches over dumb HTTP
2020-03-09 11:21:21 -07:00
Junio C Hamano
3658d77f8e Merge branch 'hd/show-one-mergetag-fix'
"git show" and others gave an object name in raw format in its
error output, which has been corrected to give it in hex.

* hd/show-one-mergetag-fix:
  show_one_mergetag: print non-parent in hex form.
2020-03-09 11:21:21 -07:00
Junio C Hamano
6125104b88 Merge branch 'rt/format-zero-length-fix'
Recently we inadvertently added a few instances of using 0-width
format string to functions that we mark as printf-like without any
developers noticing.  The root cause was that the compiler warning
that is triggered by this is almost always useless and we disabled
the warning in our developer builds, but not for general public.
The new instances have been corrected, and the warning has been
resurrected in the developer builds.

* rt/format-zero-length-fix:
  config.mak.dev: re-enable -Wformat-zero-length
  rebase-interactive.c: silence format-zero-length warnings
2020-03-09 11:21:21 -07:00
Junio C Hamano
1ac37deba2 Merge branch 'am/mingw-poll-fix'
MinGW's poll() emulation has been improved.

* am/mingw-poll-fix:
  mingw: workaround for hangs when sending STDIN
2020-03-09 11:21:20 -07:00
Junio C Hamano
cf372dc815 Merge branch 'en/test-cleanup'
Test cleanup.

* en/test-cleanup:
  t6020: new test with interleaved lexicographic ordering of directories
  t6022, t6046: test expected behavior instead of testing a proxy for it
  t3035: prefer test_must_fail to bash negation for git commands
  t6020, t6022, t6035: update merge tests to use test helper functions
  t602[1236], t6034: modernize test formatting
2020-03-09 11:21:20 -07:00
Junio C Hamano
d1075adfdf Merge branch 'en/merge-path-collision'
Handling of conflicting renames in merge-recursive have further
been made consistent with how existing codepaths try to mimic what
is done to add/add conflicts.

* en/merge-path-collision:
  merge-recursive: apply collision handling unification to recursive case
2020-03-09 11:21:20 -07:00
Junio C Hamano
a4fd114ffc Merge branch 'kk/complete-diff-color-moved'
Completion update.

* kk/complete-diff-color-moved:
  completion: add diff --color-moved[-ws]
2020-03-09 11:21:20 -07:00
Junio C Hamano
a0d752c1a3 Merge branch 'rj/t1050-use-test-path-is-file'
Code cleanup.

* rj/t1050-use-test-path-is-file:
  t1050: replace test -f with test_path_is_file
2020-03-09 11:21:20 -07:00
Junio C Hamano
0e0d717537 Merge branch 'pb/am-show-current-patch'
"git am --short-current-patch" is a way to show the piece of e-mail
for the stopped step, which is not suitable to directly feed "git
apply" (it is designed to be a good "git am" input).  It learned a
new option to show only the patch part.

* pb/am-show-current-patch:
  am: support --show-current-patch=diff to retrieve .git/rebase-apply/patch
  am: support --show-current-patch=raw as a synonym for--show-current-patch
  am: convert "resume" variable to a struct
  parse-options: convert "command mode" to a flag
  parse-options: add testcases for OPT_CMDMODE()
2020-03-09 11:21:19 -07:00
Junio C Hamano
9b7f726dfc Merge branch 'am/pathspec-f-f-more'
"git rm" and "git stash" learns the new "--pathspec-from-file"
option.

* am/pathspec-f-f-more:
  stash push: support the --pathspec-from-file option
  stash: eliminate crude option parsing
  doc: stash: synchronize <pathspec> description
  doc: stash: document more options
  doc: stash: split options from description (2)
  doc: stash: split options from description (1)
  rm: support the --pathspec-from-file option
  doc: rm: synchronize <pathspec> description
2020-03-09 11:21:19 -07:00
Johannes Schindelin
235cd37426 subtree: fix build with AsciiDoctor 2
This is a (late) companion for f6461b82b9 (Documentation: fix build
with Asciidoctor 2, 2019-09-15).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
v2.26.0-rc0.windows.1
2020-03-06 14:46:25 +01:00
Johannes Schindelin
b9630db4e8 Merge 'readme' into HEAD
Add a README.md for GitHub goodness.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2020-03-06 08:03:57 +01:00
Johannes Schindelin
0a486e15db 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>
2020-03-06 08:03:57 +01:00
Johannes Schindelin
840d176429 Merge pull request #1354 from dscho/phase-out-show-ignored-directory-gracefully
Phase out `--show-ignored-directory` gracefully
2020-03-06 08:03:56 +01:00
Johannes Schindelin
1bf450337d 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>
2020-03-06 08:03:55 +01:00
Johannes Schindelin
0668f1caee 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>
2020-03-06 08:03:55 +01:00
Johannes Schindelin
a175930f6d Merge branch 'busybox-w32'
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2020-03-06 08:03:54 +01:00
Johannes Schindelin
9b40fdd647 Merge pull request #1897 from piscisaureus/symlink-attr
Specify symlink type in .gitattributes
2020-03-06 08:03:52 +01:00
Johannes Schindelin
57889d4344 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>
2020-03-06 08:03:51 +01:00
Johannes Schindelin
633a7d5d16 Merge branch 'kblees/kb/symlinks' 2020-03-06 08:03:50 +01:00
Johannes Schindelin
bf4594d320 Merge branch 'msys2' 2020-03-06 08:03:49 +01:00
Johannes Schindelin
ffba825467 Merge branch 'long-paths' 2020-03-06 08:03:48 +01:00
Johannes Schindelin
97ec5f9c23 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>
2020-03-06 08:03:48 +01:00
Derrick Stolee
a10c364713 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.
2020-03-06 08:03:47 +01:00
Johannes Schindelin
c365723439 Merge pull request #1937 from benpeart/fscache-NtQueryDirectoryFile-gfw
fscache: teach fscache to use NtQueryDirectoryFile
2020-03-06 08:03:46 +01:00
Johannes Schindelin
e91c7c6192 Merge pull request #1934 from benpeart/fscache-thread-safe-enable-gfw
fscache: make fscache_enable() thread safe
2020-03-06 08:03:45 +01:00
Johannes Schindelin
64bfe7c91b 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>
2020-03-06 08:03:45 +01:00
Johannes Schindelin
bfad99a5ac Merge pull request #1910 from benpeart/fscache_statistics-gfw
fscache: add fscache hit statistics
2020-03-06 08:03:44 +01:00
Johannes Schindelin
aec633bdf3 Merge pull request #1914 from benpeart/free-fscache-after-add-gfw
At the end of the add command, disable and free the fscache
2020-03-06 08:03:43 +01:00
Johannes Schindelin
5b4ecec872 Merge pull request #1911 from benpeart/git_test_fscache-gfw
fscache: add GIT_TEST_FSCACHE support
2020-03-06 08:03:43 +01:00
Johannes Schindelin
b7e3fa470d Merge pull request #1909 from benpeart/free-fscache-after-status-gfw
status: disable and free fscache at the end of the status command
2020-03-06 08:03:42 +01:00
Johannes Schindelin
a4a1c549a1 Merge pull request #1908 from benpeart/FindFirstFileEx-gfw
fscache: use FindFirstFileExW to avoid retrieving the short name
2020-03-06 08:03:41 +01:00
Johannes Schindelin
c802180fd6 Merge pull request #1827 from benpeart/fscache_refresh_index
Enable the filesystem cache (fscache) in refresh_index().
2020-03-06 08:03:41 +01:00
Johannes Schindelin
0e6f46397c 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>
2020-03-06 08:03:40 +01:00
Johannes Schindelin
43a0324584 Merge pull request #1426 from atetubou/fetch_pack
fetch-pack.c: enable fscache for stats under .git/objects
2020-03-06 08:03:40 +01:00
Johannes Schindelin
d53fcb5598 Merge pull request #1344 from jeffhostetler/perf_add_excludes_with_fscache
dir.c: make add_excludes aware of fscache during status
2020-03-06 08:03:39 +01:00
Johannes Schindelin
f8c6f5aac9 Merge pull request #971 from jeffhostetler/jeffhostetler/add_preload_fscache
add: use preload-index and fscache for performance
2020-03-06 08:03:39 +01:00
Johannes Schindelin
cc1416aae4 Merge pull request #994 from jeffhostetler/jeffhostetler/fscache_nfd
fscache: add not-found directory cache to fscache
2020-03-06 08:03:38 +01:00
Johannes Schindelin
73e5b50f42 Merge branch 'fscache' 2020-03-06 08:03:37 +01:00
Johannes Schindelin
b271bec90b 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>
2020-03-06 08:03:37 +01:00
Johannes Schindelin
8e764e9ac6 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>
2020-03-06 08:03:36 +01:00
Johannes Schindelin
c64d5d3338 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.
2020-03-06 08:03:35 +01:00
Johannes Schindelin
1f1a5ae77e 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>
2020-03-06 08:03:32 +01:00
Johannes Schindelin
b6a6107231 mingw: kill child processes in a gentler way
The TerminateProcess() function does not actually leave the child
processes any chance to perform any cleanup operations. This is bad
insofar as Git itself expects its signal handlers to run.

A symptom is e.g. a left-behind .lock file that would not be left behind
if the same operation was run, say, on Linux.

To remedy this situation, we use an obscure trick: we inject a thread
into the process that needs to be killed and to let that thread run the
ExitProcess() function with the desired exit status. Thanks J Wyman for
describing this trick.

The advantage is that the ExitProcess() function lets the atexit
handlers run. While this is still different from what Git expects (i.e.
running a signal handler), in practice Git sets up signal handlers and
atexit handlers that call the same code to clean up after itself.

In case that the gentle method to terminate the process failed, we still
fall back to calling TerminateProcess(), but in that case we now also
make sure that processes spawned by the spawned process are terminated;
TerminateProcess() does not give the spawned process a chance to do so
itself.

Please note that this change only affects how Git for Windows tries to
terminate processes spawned by Git's own executables. Third-party
software that *calls* Git and wants to terminate it *still* need to make
sure to imitate this gentle method, otherwise this patch will not have
any effect.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2020-03-06 08:03:32 +01:00