Граф коммитов

100077 Коммитов

Автор SHA1 Сообщение Дата
Johannes Schindelin 1ec91ae74d mark_fsmonitor_valid(): mark the index as changed if needed
Without this bug fix, t7519's four "status doesn't detect unreported
modifications" test cases would fail occasionally (and, oddly enough,
*a lot* more frequently on Windows).

The reason is that these test cases intentionally use the side effect of
`git status` to re-write the index if any updates were detected: they
first clean the worktree, run `git status` to update the index as well
as show the output to the casual reader, then make the worktree dirty
again and expect no changes to reported if running with a mocked
fsmonitor hook.

The problem with this strategy was that the index was written during
said `git status` on the clean worktree for the *wrong* reason: not
because the index was marked as changed (it wasn't), but because the
recorded mtimes were racy with the index' own mtime.

As the mtime granularity on Windows is 100 nanoseconds (see e.g.
https://docs.microsoft.com/en-us/windows/desktop/SysInfo/file-times),
the mtimes of the files are often enough *not* racy with the index', so
that that `git status` call currently does not always update the index
(including the fsmonitor extension), causing the test case to fail.

The obvious fix: if we change *any* index entry's `CE_FSMONITOR_VALID`
flag, we should also mark the index as changed. That will cause the
index to be written upon `git status`, *including* an updated fsmonitor
extension.

Side note: Even though the reader might think that the t7519 issue
should be *much* more prevalent on Linux, given that the ext4 filesystem
(that seems to be used by every Linux distribution) stores mtimes in
nanosecond precision. However, ext4 uses `current_kernel_time()` (see
https://unix.stackexchange.com/questions/11599#comment762968_11599; it
is *amazingly* hard to find any proper source of information about such
ext4 questions) whose accuracy seems to depend on many factors but is
safely worse than the 100-nanosecond granularity of NTFS (again, it is
*horribly* hard to find anything remotely authoritative about this
question). So it seems that the racy index condition that hid the bug
fixed by this patch simply is a lot more likely on Linux than on
Windows. But not impossible ;-)

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-06-07 23:14:03 +02:00
Johannes Schindelin 0391524bd2 fill_stat_cache_info(): prepare for an fsmonitor fix
We will need to pass down the `struct index_state` to
`mark_fsmonitor_valid()` for an upcoming bug fix, and this here function
calls that there function, so we need to extend the signature of
`fill_stat_cache_info()` first.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-06-07 23:14:03 +02:00
Johannes Schindelin b18fe7a141 Start the merging-rebase to v2.22.0
This commit starts the rebase of 0fc7a44145 to 286461941b
2019-06-07 23:13:46 +02:00
Junio C Hamano b697d92f56 Git 2.22
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-06-07 09:39:21 -07:00
Junio C Hamano 6ee1eaca3e l10n-2.22.0-rnd3
-----BEGIN PGP SIGNATURE-----
 
 iQJNBAABCgA3FiEET/4dIHc7EQTOoGRdx6TpG3VEeigFAlz6JwgZHHdvcmxkaGVs
 bG8ubmV0QGdtYWlsLmNvbQAKCRDHpOkbdUR6KJIiEACdMlFDsNNZ1bG5hpwLIRTN
 aK2y1L0sJDLvjjvXIR4VSjWHjazeIQqMCw+O3F90a2NAHHjGhHPTbHPgpiTnTeyd
 UUhCECHRVf3qFm+WvSsxFTbAwTeah4vKIe/X5kHuMNyxJNBXhvfCVjbFRKwktSGV
 +Oot5d5QR/cLsCJNrSyifwHS2AvXnSqR57p78oWNEmusnORYfZM5J/muRcbaxOhi
 FcFEBZAmpC1Kp+0QvTt4KGMjbbpzgWz5jm7NuyEhETNQPnXY9Uo6LppkSEZnRQwt
 rwzJkPKtGmFfwgey9YvTX6uXBQuugDPEIPL5pmRvOe4LNCTu1DKatpDg15HIBH+e
 JKtCjE4vDQCD22w9ARRkxJFiGUBhqyfiX/RJmNTeQyH7TQPP9cy5r6P4S2yNESDK
 yFe17J4GCBbe/L4fvqC0qPZxYI0lMV5n2oT21KTv5OwLK5b96EtsgDG53VEzrYsN
 zwUcpJYg/L5MlLX19UHZVNxay0ri7y2cdYMOhXYKN2/xuf/lbiweWOpODg5uzH8E
 ymoXc/Vu0k/ltVx9JqY1JFeNe9FDa2sf67n2XgiW/JZAGOwqnR0rt4dQ0iE9mDmn
 qqkWo/2xZymOZoV0IjruChAMYnB3jlpZbIGU9gUH/zurd1iu/seVfpK+VllcXS+p
 se6TLAwZkNybfy0eNsMGzw==
 =IHre
 -----END PGP SIGNATURE-----

Merge tag 'l10n-2.22.0-rnd3' of git://github.com/git-l10n/git-po

l10n-2.22.0-rnd3

* tag 'l10n-2.22.0-rnd3' of git://github.com/git-l10n/git-po: (25 commits)
  l10n: fr.po: Review French translation
  l10n: de.po: Update German translation
  l10n: de.po: improve description of 'git reset --quiet'
  l10n: TEAMS: Change German translation team leader
  l10n: bg.po: Updated Bulgarian translation (4581t)
  l10n: zh_CN: Revision for git v2.22.0 l10n
  l10n: zh_CN: for git v2.22.0 l10n round 1~3
  l10n: es: 2.22.0 round 3
  l10n: it.po: Updated Italian translation
  l10n: fr v2.22.0 rnd 3
  l10n: vi.po(4581t): Updated Vietnamese translation for v2.22.0 round 3
  l10n: git.pot: v2.22.0 round 3 (3 new, 2 removed)
  l10n: es: 2.22.0 round 2
  l10n: bg.po: Updated Bulgarian translation (4580t)
  l10n: vi.po(4580t): Updated Vietnamese translation for v2.22.0 round 2
  l10n: fr.po v2.22.0 round 2
  l10n: git.pot: v2.22.0 round 2 (6 new, 3 removed)
  l10n: bg.po: Updated Bulgarian translation (4577t)
  l10n: es: 2.22.0 round 1
  l10n: vi.po(4577t): Updated Vietnamese translation for v2.22.0 round 1
  ...
2019-06-07 09:36:32 -07:00
Jiang Xin 0cdb8d2db2 Merge branch 'fr_review' of git://github.com/jnavila/git
* 'fr_review' of git://github.com/jnavila/git:
  l10n: fr.po: Review French translation
2019-06-07 16:51:09 +08:00
Jiang Xin d014920079 Merge branch 'master' of git://github.com/alshopov/git-po
* 'master' of git://github.com/alshopov/git-po:
  l10n: bg.po: Updated Bulgarian translation (4581t)
2019-06-07 16:50:23 +08:00
Cédric Malard 82eb147dbb l10n: fr.po: Review French translation
Signed-off-by: Cédric Malard <c.malard-git@valdun.net>
Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
2019-06-07 08:54:28 +02:00
Junio C Hamano 20fbf7dd42 Merge branch 'en/merge-directory-renames-fix'
Recent code restructuring of merge-recursive engine introduced a
regression dealing with rename/add conflict.

* en/merge-directory-renames-fix:
  merge-recursive: restore accidentally dropped setting of path
2019-06-06 14:03:36 -07:00
Matthias Rüster 219829ae83 l10n: de.po: Update German translation
Reviewed-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com>
2019-06-06 07:03:26 +02:00
Ralf Thielow 8c18948b78 l10n: de.po: improve description of 'git reset --quiet'
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2019-06-06 07:03:25 +02:00
Matthias Rüster d314d77577 l10n: TEAMS: Change German translation team leader
Acked-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com>
2019-06-05 20:48:37 +02:00
Elijah Newren 481de8a293 merge-recursive: restore accidentally dropped setting of path
In commit 8daec1df03 ("merge-recursive: switch from (oid,mode) pairs
to a diff_filespec", 2019-04-05), we actually switched from
(oid,mode,path) triplets to a diff_filespec -- but most callsites in the
patch only needed to worry about oid and mode so the commit message
focused on that.  The oversight in the commit message apparently spilled
over to the code as well; one of the dozen or so callsites accidentally
dropped the setting of the path in the conversion.  Restore the path
setting in that location.

Also, this pointed out that our testsuite was lacking a good rename/add
test, at least one that involved the need for merge content with the
rename.  Add such a test, and since rename/add vs. add/rename could
possibly be important, redo the merge the opposite direction to make
sure we don't have issues with the direction of the merge.  These
testcases failed before restoring the setting of path, but with the
paths appropriately set the testcases both pass.

Reported-by: Ben Humphreys <behumphreys@atlassian.com>
Based-on-patch-by: SZEDER Gábor <szeder.dev@gmail.com>
Tested-by: Ben Humphreys <behumphreys@atlassian.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-06-05 09:30:40 -07:00
Alexander Shopov de2b0545ee l10n: bg.po: Updated Bulgarian translation (4581t)
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2019-06-05 08:51:15 +02:00
Fangyi Zhou 5b5336320b l10n: zh_CN: Revision for git v2.22.0 l10n
Revise 51 translations, improving consistency for some phrased.
Update email address for Fangyi Zhou

Signed-off-by: Fangyi Zhou <me@fangyi.io>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2019-06-05 08:37:30 +08:00
Jiang Xin d46c551928 l10n: zh_CN: for git v2.22.0 l10n round 1~3
Translate 274 new messages (4581t0f0u) for git 2.22.0.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2019-06-05 08:37:30 +08:00
Jiang Xin 914bd0923e Merge branch '2.22' of https://github.com/ChrisADR/git-po
* '2.22' of https://github.com/ChrisADR/git-po:
  l10n: es: 2.22.0 round 3
2019-06-05 08:35:35 +08:00
Jiang Xin 488ed582d3 Merge branch 'it-l10n-wip' of github.com:AlessandroMenti/git-po
* 'it-l10n-wip' of github.com:AlessandroMenti/git-po:
  l10n: it.po: Updated Italian translation
2019-06-05 08:17:28 +08:00
Christopher Diaz Riveros 922a0a7d98 l10n: es: 2.22.0 round 3
Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
2019-06-04 18:52:28 -05:00
Alessandro Menti bbc55709e7
l10n: it.po: Updated Italian translation
Signed-off-by: Alessandro Menti <alessandro.menti@alessandromenti.it>
2019-06-04 22:27:19 +02:00
Jean-Noël Avila 85b66ac50d l10n: fr v2.22.0 rnd 3
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
2019-06-04 19:53:32 +02:00
Tran Ngoc Quan 77e1962193 l10n: vi.po(4581t): Updated Vietnamese translation for v2.22.0 round 3
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
2019-06-04 08:13:53 +07:00
Jiang Xin 386544cd84 l10n: git.pot: v2.22.0 round 3 (3 new, 2 removed)
Generate po/git.pot from v2.22.0-rc3 for git v2.22.0 l10n round 3.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2019-06-04 08:27:36 +08:00
Jiang Xin b50e1c093c Merge branch 'master' of git://git.kernel.org/pub/scm/git/git
* 'master' of git://git.kernel.org/pub/scm/git/git:
  Git 2.22-rc3
  i18n: fix typos found during l10n for git 2.22.0
  RelNotes: minor typo fixes in 2.22.0 draft
  list-objects-filter: disable 'sparse:path' filters
2019-06-04 08:24:28 +08:00
Johannes Schindelin 9c8cba6862 Merge 'readme' into HEAD
Add a README.md for GitHub goodness.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-06-03 23:04:59 +02:00
Johannes Schindelin ba42a27a15 Merge pull request #1354 from dscho/phase-out-show-ignored-directory-gracefully
Phase out `--show-ignored-directory` gracefully
2019-06-03 23:04:59 +02:00
Johannes Schindelin dba129df37 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-06-03 23:04:58 +02:00
Johannes Schindelin febd443002 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-06-03 23:04:58 +02:00
Johannes Schindelin 009f359231 Merge branch 'busybox-w32'
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-06-03 23:04:58 +02:00
Johannes Schindelin 5a6a4fae21 Merge pull request #2091 from dscho/symlink-attr-extra
Touch up symlink .gitattributes support
2019-06-03 23:04:58 +02:00
Johannes Schindelin ede02c578c Merge pull request #1897 from piscisaureus/symlink-attr
Specify symlink type in .gitattributes
2019-06-03 23:04:57 +02:00
Johannes Schindelin f2af5c0a7d 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-06-03 23:04:57 +02:00
Johannes Schindelin 89ac5e4601 Merge branch 'kblees/kb/symlinks' 2019-06-03 23:04:57 +02:00
Johannes Schindelin b453f1db71 Merge branch 'msys2' 2019-06-03 23:04:56 +02:00
Johannes Schindelin 9b70470226 Merge branch 'long-paths' 2019-06-03 23:04:56 +02:00
Johannes Schindelin c1891b565a Merge pull request #1937 from benpeart/fscache-NtQueryDirectoryFile-gfw
fscache: teach fscache to use NtQueryDirectoryFile
2019-06-03 23:04:56 +02:00
Johannes Schindelin 74342c85d2 Merge pull request #1934 from benpeart/fscache-thread-safe-enable-gfw
fscache: make fscache_enable() thread safe
2019-06-03 23:04:56 +02:00
Johannes Schindelin 3fb3bd41e4 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-06-03 23:04:55 +02:00
Johannes Schindelin 8e81dbc971 Merge pull request #1910 from benpeart/fscache_statistics-gfw
fscache: add fscache hit statistics
2019-06-03 23:04:55 +02:00
Johannes Schindelin 9124ebb185 Merge pull request #1914 from benpeart/free-fscache-after-add-gfw
At the end of the add command, disable and free the fscache
2019-06-03 23:04:55 +02:00
Johannes Schindelin 7acc751611 Merge pull request #1911 from benpeart/git_test_fscache-gfw
fscache: add GIT_TEST_FSCACHE support
2019-06-03 23:04:55 +02:00
Johannes Schindelin 229a3a8b50 Merge pull request #1909 from benpeart/free-fscache-after-status-gfw
status: disable and free fscache at the end of the status command
2019-06-03 23:04:55 +02:00
Johannes Schindelin e9a6b2e866 Merge pull request #1908 from benpeart/FindFirstFileEx-gfw
fscache: use FindFirstFileExW to avoid retrieving the short name
2019-06-03 23:04:54 +02:00
Johannes Schindelin 4fc613af5f Merge pull request #1827 from benpeart/fscache_refresh_index
Enable the filesystem cache (fscache) in refresh_index().
2019-06-03 23:04:54 +02:00
Johannes Schindelin 584abc861d 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-06-03 23:04:54 +02:00
Johannes Schindelin 074256c163 Merge pull request #1426 from atetubou/fetch_pack
fetch-pack.c: enable fscache for stats under .git/objects
2019-06-03 23:04:54 +02:00
Johannes Schindelin 22dc75de7e Merge pull request #1344 from jeffhostetler/perf_add_excludes_with_fscache
dir.c: make add_excludes aware of fscache during status
2019-06-03 23:04:54 +02:00
Johannes Schindelin 73b2d58918 Merge pull request #971 from jeffhostetler/jeffhostetler/add_preload_fscache
add: use preload-index and fscache for performance
2019-06-03 23:04:53 +02:00
Johannes Schindelin 7bd0779c0b Merge pull request #994 from jeffhostetler/jeffhostetler/fscache_nfd
fscache: add not-found directory cache to fscache
2019-06-03 23:04:53 +02:00
Johannes Schindelin 95843ae729 Merge branch 'fscache' 2019-06-03 23:04:53 +02:00