Commit Graph

111916 Commits

Author SHA1 Message Date
Johannes Schindelin
e730754da0 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-07-27 13:35:52 -04:00
Sverre Rabbelier
6f509a1d5f 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-07-27 13:35:52 -04:00
Sverre Rabbelier
43184f4ce9 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-07-27 13:35:52 -04:00
Sverre Rabbelier
4899b37a03 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-07-27 13:35:52 -04:00
Derrick Stolee
e62b20a1d3 Start the merging-rebase to v2.28.0
This commit starts the rebase of 2be6fc24a5 to 4c8bcdda4d6
2020-07-27 13:35:50 -04:00
Junio C Hamano
47ae905ffb Git 2.28
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-26 18:01:43 -07:00
Junio C Hamano
5c06d60fc5 Merge tag 'l10n-2.28.0-rnd1' of https://www.github.com/git-l10n/git-po into master
l10n-2.28.0-rnd1

* tag 'l10n-2.28.0-rnd1' of https://www.github.com/git-l10n/git-po:
  l10n: es: 2.28.0 round 1
  l10n: de.po: Update German translation for Git v2.28.0
  l10n: de.po: fix grammar
  l10n: zh_CN: for git v2.28.0 l10n round 1
  l10n: zh_TW.po: v2.28.0 round 1 (0 untranslated)
  l10n: vi.po: correct "ident line" translation
  l10n: vi.po(4931t): Updated translation for v2.28.0
  l10n: fr v2.28.0 round 1
  l10n: sv.po: Update Swedish translation (4931t0f0u)
  l10n: it.po: update the Italian translation for Git 2.28.0 round 1
  l10n: tr: v2.28.0 round 1
  l10n: git.pot: v2.28.0 round 1 (70 new, 14 removed)
  l10n: Update Catalan translation
2020-07-26 09:48:11 -07:00
Jiang Xin
05b3a3d730 Merge branch 'master' of github.com:Softcatala/git-po
* 'master' of github.com:Softcatala/git-po:
  l10n: Update Catalan translation
2020-07-27 00:05:41 +08:00
Christopher Diaz Riveros
7b0e326ba9 l10n: es: 2.28.0 round 1
Signed-off-by: Christopher Diaz Riveros <christopher.diaz.riv@gmail.com>
2020-07-26 10:12:01 -05:00
Junio C Hamano
418cca9555 Merge branch 'ps/ref-transaction-hook' into master
A new hook.

* ps/ref-transaction-hook:
  githooks.txt: use correct "reference-transaction" hook name
2020-07-24 15:54:06 -07:00
Bojun Chen
6c18d03eb8 githooks.txt: use correct "reference-transaction" hook name
The "reference transaction" hook was introduced in commit 6754159767
(refs: implement reference transaction hook, 2020-06-19). The name of
the hook is declared as "reference-transaction" in "refs.c" and
testcases, but the name declared in "githooks.txt" is different.

Signed-off-by: Bojun Chen <bojun.cbj@alibaba-inc.com>
Reviewed-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-24 13:53:58 -07:00
Matthias Rüster
45f83df1b5 l10n: de.po: Update German translation for Git v2.28.0
Reviewed-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com>
2020-07-24 20:35:30 +02:00
Ralf Thielow
7112e051c7 l10n: de.po: fix grammar
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com>
2020-07-24 20:33:38 +02:00
Taylor Blau
3d20111cbd Documentation/RelNotes: fix a typo in 2.28's relnotes
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-07-22 14:10:20 -07:00
Johannes Schindelin
30db709d61 Merge pull request #2731 from SyntevoAlex/#0312(win)_clone_adds_worktree
Fix problem where clone adds core.worktree due to path case differences
v2.28.0-rc2.windows.1
2020-07-22 13:40:59 -04:00
Johannes Schindelin
b7cc8fe832 Merge pull request #2714 from lbonanomi/main
Rationalize line endings for scissors-cleanup
2020-07-22 13:40:58 -04:00
Johannes Schindelin
ffb9677f44 Merge pull request #2730 from dscho/crlf-aware-git-add-i
git add -i: handle CR/LF line endings in the interactive input
2020-07-22 13:40:57 -04:00
Alexandr Miloslavskiy
cf53097972 mingw_strbuf_realpath(): handle case of non existent last path component
git often requests `strbuf_realpath(path + "/.git")`, where "./git" does
not yet exist on disk.

This causes the following to happen:
1. `mingw_strbuf_realpath()` fails
2. Non-mingw `strbuf_realpath()` does the work
3. Result of `strbuf_realpath()` is slightly different, for example it
   will not normalize the case of disk/folder names
4. `needs_work_tree_config()` becomes confused by these differences
5. clone adds `core.worktree` setting

This in turn causes various problems, for example:
1. Repository folder can no longer be renamed/moved without breaking it
2. Using the repository on WSL (Windows Subsystem for Linux) doesn't
   work, because it has windows-style path saved

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

Co-Authored-By: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
2020-07-22 13:40:55 -04:00
Luke Bonanomi
1e2386f5ef commit: accept "scissors" with CR/LF line endings
This change enhances `git commit --cleanup=scissors` by detecting
scissors lines ending in either LF (UNIX-style) or CR/LF (DOS-style).

Regression tests are included to specifically test for trailing
comments after a CR/LF-terminated scissors line.

Signed-off-by: Luke Bonanomi <lbonanomi@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2020-07-22 13:40:55 -04:00
Johannes Schindelin
3dab76030d git add -i: handle CR/LF line endings in the interactive input
As of Git for Windows v2.27.0, there is an option to use Windows'
newly-introduced Pseudo Console support. When running an interactive add
operation with this support enabled, Git will receive CR/LF line
endings.

Therefore, let's not pretend that we are expecting Unix line endings.

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

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2020-07-22 13:40:54 -04:00
Johannes Schindelin
545dac9c1e Mirror master and main
In preparation for eventually switching over to `main`, let's
synchronize the historical and the designated future main branch.

This follows the excellent advice from
https://github.com/chancancode/branch-rename/#gradual-migration

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2020-07-22 13:40:53 -04:00
Johannes Schindelin
030d815a4e Merge pull request #2673 from dscho/also-handle-fscache-addon-for-#2637
Fix `lstat()`'s `st_size` computation for symbolic links when FSCache is in effect
2020-07-22 13:40:53 -04:00
Johannes Schindelin
f1de7e32d6 fscache: compute correct symlink size in lstat()
In https://github.com/git-for-windows/git/pull/2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

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

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2020-07-22 13:40:52 -04:00
Johannes Schindelin
71d253f690 Merge pull request #2666 from dscho/nicer-upgrade-path-for-#2637
mingw: special-case index entries for symlinks with buggy size
2020-07-22 13:40:51 -04:00
Johannes Schindelin
fa966d7d1f Merge 'readme' into HEAD
Add a README.md for GitHub goodness.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2020-07-22 13:40:50 -04:00
Johannes Schindelin
30c7113185 mingw: special-case index entries for symlinks with buggy size
In https://github.com/git-for-windows/git/pull/2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index. The downside of this fix was that every user with tracked
symbolic links in their checkouts would see them as modified in `git
status`, but not in `git diff`, and only a `git add <path>` (or `git add
-u`) would "fix" this.

Let's do better than that: we can detect that situation and simply
pretend that a symbolic link with a known bad size (or a size that just
happens to be that bad size, a _very_ unlikely scenario because it would
overflow our buffers due to the trailing NUL byte) means that it needs
to be re-checked as if we had just checked it out.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2020-07-22 13:40:50 -04:00
Johannes Schindelin
fc4d1e2ab5 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-07-22 13:40:49 -04:00
Johannes Schindelin
9e2886b647 Merge pull request #1354 from dscho/phase-out-show-ignored-directory-gracefully
Phase out `--show-ignored-directory` gracefully
2020-07-22 13:40:48 -04:00
Johannes Schindelin
42b015faa9 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-07-22 13:40:47 -04:00
Johannes Schindelin
76626589fe 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-07-22 13:40:46 -04:00
Johannes Schindelin
c92cf8488b Merge branch 'busybox-w32'
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2020-07-22 13:40:45 -04:00
Johannes Schindelin
34d283535e Merge pull request #1897 from piscisaureus/symlink-attr
Specify symlink type in .gitattributes
2020-07-22 13:40:44 -04:00
Johannes Schindelin
77729794fd Merge pull request #2637 from billziss-gh/master
mingw: lstat: compute correct size for symlinks
2020-07-22 13:40:43 -04:00
Johannes Schindelin
2d9b964d13 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-07-22 13:40:42 -04:00
Johannes Schindelin
5ad3603e2a Merge branch 'kblees/kb/symlinks' 2020-07-22 13:40:41 -04:00
Johannes Schindelin
bdbbcd3807 Merge branch 'msys2' 2020-07-22 13:40:40 -04:00
Johannes Schindelin
4532744cd5 Merge branch 'long-paths' 2020-07-22 13:40:39 -04:00
Johannes Schindelin
bd58447520 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-07-22 13:40:38 -04:00
Derrick Stolee
873cea5079 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-07-22 13:40:37 -04:00
Johannes Schindelin
213f33f393 Merge pull request #1937 from benpeart/fscache-NtQueryDirectoryFile-gfw
fscache: teach fscache to use NtQueryDirectoryFile
2020-07-22 13:40:36 -04:00
Johannes Schindelin
5d3c4586d6 Merge pull request #1934 from benpeart/fscache-thread-safe-enable-gfw
fscache: make fscache_enable() thread safe
2020-07-22 13:40:35 -04:00
Johannes Schindelin
b8d00bac0d 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-07-22 13:40:34 -04:00
Johannes Schindelin
28c202e380 Merge pull request #1910 from benpeart/fscache_statistics-gfw
fscache: add fscache hit statistics
2020-07-22 13:40:33 -04:00
Johannes Schindelin
0fd43f0466 Merge pull request #1914 from benpeart/free-fscache-after-add-gfw
At the end of the add command, disable and free the fscache
2020-07-22 13:40:32 -04:00
Johannes Schindelin
bd7133c792 Merge pull request #1911 from benpeart/git_test_fscache-gfw
fscache: add GIT_TEST_FSCACHE support
2020-07-22 13:40:31 -04:00
Johannes Schindelin
542c64cfc6 Merge pull request #1909 from benpeart/free-fscache-after-status-gfw
status: disable and free fscache at the end of the status command
2020-07-22 13:40:30 -04:00
Johannes Schindelin
d03d8fca7d Merge pull request #1908 from benpeart/FindFirstFileEx-gfw
fscache: use FindFirstFileExW to avoid retrieving the short name
2020-07-22 13:40:29 -04:00
Johannes Schindelin
26a146b1f1 Merge pull request #1827 from benpeart/fscache_refresh_index
Enable the filesystem cache (fscache) in refresh_index().
2020-07-22 13:40:28 -04:00
Johannes Schindelin
aec87c79b3 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-07-22 13:40:28 -04:00
Johannes Schindelin
847890225c Merge pull request #1426 from atetubou/fetch_pack
fetch-pack.c: enable fscache for stats under .git/objects
2020-07-22 13:40:27 -04:00