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

68140 Коммитов

Автор SHA1 Сообщение Дата
Taylor Blau e9c3839944 pack-bitmap-write.c: instrument number of reused bitmaps
When debugging bitmap generation performance, it is useful to know how
many bitmaps were generated from scratch, and how many were the result
of permuting the bit-order of an existing bitmap.

Keep track of the latter, and emit the count as a trace2_data line to
aid in debugging.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-13 13:35:08 -07:00
Taylor Blau 2dcff52524 midx.c: instrument MIDX and bitmap generation with trace2 regions
When debugging MIDX and MIDX-bitmap related issues, it is useful to
figure out where Git is spending its time.

GitHub has been using the below trace2 regions to instrument various
components of generating a MIDX itself, as well time spent preparing to
build a MIDX bitmap.

These are limited to instrumenting the following functions:

  - midx.c::find_commits_for_midx_bitmap()
  - midx.c::midx_pack_order()
  - midx.c::prepare_midx_packing_data()
  - midx.c::write_midx_bitmap()
  - midx.c::write_midx_internal()
  - midx.c::write_midx_reverse_index()

to start and end with a trace2_region_enter() and trace2_region_leave(),
respectively.

The category for all of these is "midx", which matches the existing
convention. The region description matches the name of the function.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-13 13:35:07 -07:00
Taylor Blau 1dc4f1ef0d midx.c: consider annotated tags during bitmap selection
When generating a multi-pack bitmap without a `--refs-snapshot` (e.g.,
by running `git multi-pack-index write --bitmap` directly), we determine
the set of bitmap-able commits by enumerating each reference, and adding
the referrent as the tip of a reachability traversal when it appears
somewhere in the MIDX. (Any commit we encounter during the reachability
traversal then becomes a candidate for bitmap selection).

But we incorrectly avoid peeling the object at the tip of each
reference. So if we see some reference that points at an annotated tag
(which in turn points through zero or more additional annotated tags at
a commit), that we will not add it as a tip for the reachability
traversal. This means that if some commit C is only referenced through
one or more annotated tag(s), then C won't become a bitmap candidate.

Correct this by peeling the reference tips as we enumerate them to
ensure that we consider commits which are the targets of annotated tags,
in addition to commits which are referenced directly.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-13 13:35:05 -07:00
Taylor Blau a8437f3cb1 midx.c: fix whitespace typo
This was unintentionally introduced via 893b563505 (midx: inline
nth_midxed_pack_entry(), 2021-09-11) where "struct repository *r"
became "struct repository * r".

The latter does not adhere to our usual style conventions, so fix that
up to look more like our usual declarations.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-13 13:35:03 -07:00
Junio C Hamano 3dcec76d9d Git 2.38
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-02 08:43:56 -07:00
Junio C Hamano c03bee6e9f l10n-2.38.0-rnd3
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE37vMEzKDqYvVxs51k24VDd1FMtUFAmM5XYMACgkQk24VDd1F
 MtUgqQ//X/+7AOMeG/jzPaiWd5f0PrwHX0lFC0VJnXLOGHkd4Ext0T8+W9HVc+FS
 q2Zo3mXrRVQIvqUDJ1UMko4dwRwnMiDpYXm7bD23b6rmvicBUU/tDjWuYXygWOzI
 Fvyq14wiJsvBA0y6zWfa7tsrRSgS+sVSlelaxxK0ijMMhGtiRWHF/pH1naNfiQ02
 ZLKHMuPQ6CAEU+Z9CkJhyeXT9mHMLKBBHgkB6FbYed436pG8w8iTDfNesmsRZhRK
 RJpv94MtMRXL54ni3giJWuH47WNh4kU4l/vcgj/24qUCSE60EP6c+86DqehxDx9i
 4jcNYjEEqFP4UgaU4lzWMSKFK6bx0lEI4IGdPN0VA1oLGozI1eX9uUemYisn+d4J
 kRx6peOYwaPAyikaxinEYB7WVwRr6eMsQ+JWc+PoD6zinXMB/w9KiN9U0dlRc5yE
 xOUm0i2Ulpaez/i61UTMnXgOUFiKXe9gAtU8FlVoym9X1ygPk7QFD6MIu/mNjtfz
 Eg2uLCmF3UpSlakTwGXPsHEY2gNfCxsh2wQnYA+YRQYeCCJAoJwx5KdT9kbNiFxj
 CJTr6kv5nH5l+ROK/jFHnV3Tqqjhqu4tYCajnsOduOz6aupyLwhe3hT4AeOx4TEy
 M6ngR9xfPEInLgkxrsUxZoQGH6vIkfTvWw1tCgOI3okmBWSnCMg=
 =lJz/
 -----END PGP SIGNATURE-----

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

l10n-2.38.0-rnd3

* tag 'l10n-2.38.0-rnd3' of https://github.com/git-l10n/git-po: (25 commits)
  l10n: zh_TW.po: Git 2.38.0, round 3
  l10n: fr: v2.38.0 round 3
  l10n: Update Catalan translation
  l10n: de.po: update German translation
  l10n: zh_CN: 2.38.0 round 3
  l10n: tr: v2.38.0 3rd round
  l10n: bg.po: Updated Bulgarian translation (5484t)
  l10n: po-id for 2.38 (round 3)
  l10n: es: update translation
  l10n: sv.po: Update Swedish translation (5484t0f0u)
  l10n: Update Catalan translation
  l10n: fr: don't say that merge is "the default strategy"
  l10n: zh_CN v2.38.0 rounds 1 & 2
  l10n: po-id for 2.38 (round 2)
  l10n: tr: v2.38.0 round 2
  l10n: bg.po: Updated Bulgarian translation (5484t)
  l10n: fr: v2.38.0 round 2
  l10n: fr: v2.38 round 1
  l10n: fr: The word 'branche' is only feminine
  l10n: Update Catalan translation
  ...
2022-10-02 08:24:32 -07:00
Yi-Jyun Pan dedb2883ce
l10n: zh_TW.po: Git 2.38.0, round 3
Signed-off-by: Yi-Jyun Pan <pan93412@gmail.com>
2022-10-01 19:10:41 +08:00
Jiang Xin d7f69b76ec Merge branch 'po-id' of github.com:bagasme/git-po
* 'po-id' of github.com:bagasme/git-po:
  l10n: po-id for 2.38 (round 3)
2022-10-01 10:02:03 +08:00
Jiang Xin 21cefac967 Merge branch 'l10n-de-2.38-rnd3' of github.com:ralfth/git
* 'l10n-de-2.38-rnd3' of github.com:ralfth/git:
  l10n: de.po: update German translation
2022-09-29 18:54:12 +08:00
Jiang Xin 48bf511320 Merge branch 'fr_2.38_rnd3' of github.com:jnavila/git
* 'fr_2.38_rnd3' of github.com:jnavila/git:
  l10n: fr: v2.38.0 round 3
2022-09-29 08:00:30 +08:00
Jiang Xin 08f41b8171 Merge branch 'catalan' of github.com:Softcatala/git-po
* 'catalan' of github.com:Softcatala/git-po:
  l10n: Update Catalan translation
2022-09-29 07:59:44 +08:00
Jean-Noël Avila 48fe8e6a63 l10n: fr: v2.38.0 round 3
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
2022-09-28 21:46:22 +02:00
Jordi Mas 42fe2b951a l10n: Update Catalan translation
Signed-off-by: Jordi Mas <jmas@softcatala.org>
2022-09-28 19:05:55 +02:00
Ralf Thielow 92e51feec5 l10n: de.po: update German translation
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2022-09-28 17:15:53 +02:00
Fangyi Zhou b796ca1cd4
l10n: zh_CN: 2.38.0 round 3
Signed-off-by: Fangyi Zhou <me@fangyi.io>
2022-09-28 15:51:07 +01:00
Jiang Xin 37db9416c4 Merge branch 'turkish' of github.com:bitigchi/git-po
* 'turkish' of github.com:bitigchi/git-po:
  l10n: tr: v2.38.0 3rd round
2022-09-28 20:54:29 +08:00
Jiang Xin 8d500614f7 Merge branch 'master' of github.com:alshopov/git-po
* 'master' of github.com:alshopov/git-po:
  l10n: bg.po: Updated Bulgarian translation (5484t)
2022-09-28 20:52:34 +08:00
Emir SARI 2c30dfa7d7 l10n: tr: v2.38.0 3rd round
Signed-off-by: Emir SARI <emir_sari@icloud.com>
2022-09-28 12:32:13 +03:00
Alexander Shopov 88fda53a16 l10n: bg.po: Updated Bulgarian translation (5484t)
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2022-09-28 11:07:07 +02:00
Bagas Sanjaya 55b1c1ab1c l10n: po-id for 2.38 (round 3)
Update following components:

  * sequencer.c
  * wt-status.c

Translate following new components:

  * compat/compiler.h
  * compat/disk.h
  * compat/fsmonitor/fsm-health-win32.c
  * compat/fsmonitor/fsm-listen-darwin.c
  * compat/fsmonitor/fsm-listen-win32.c
  * compat/fsmonitor/fsm-settings-win32.c
  * compat/mingw.c
  * compat/obstack.c
  * compat/regex/regcomp.c
  * compat/simple-ipc/ipc-unix-socket.c
  * compat/simple-ipc/ipc-win32.c
  * compat/terminal.c
  * convert.c
  * entry.c
  * environment.c
  * exec-cmd.c
  * git-merge-octopus.sh
  * git-sh-setup.sh
  * list-objects-filter-options.c
  * list-objects-filter-options.h
  * list-objects.c
  * lockfile.c
  * ls-refs.c
  * mailinfo.c
  * name-hash.c
  * notes-merge.c
  * notes-utils.c
  * pkt-line.c
  * preload-index.c
  * pretty.c
  * promisor-remote.c
  * protocol-caps.c
  * read-cache.c
  * scalar.c
  * transport-helper.c
  * transport.c
  * tree-walk.c
  * urlmatch.c
  * walker.c
  * wrapper.c

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
2022-09-28 15:06:14 +07:00
Alex Henrie 9af6cb88b6 l10n: es: update translation
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
2022-09-27 22:56:55 -06:00
Jiang Xin 4ff58e9690 Merge branch 'main' of github.com:git/git
* 'main' of github.com:git/git:
  Git 2.38-rc2
  pack-bitmap: remove trace2 region from hot path
2022-09-28 08:03:38 +08:00
Junio C Hamano bcd6bc478a Git 2.38-rc2
We have small updates since -rc1 but none of them is about a new
thing and there is no updates to the release notes.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-27 11:25:52 -07:00
Junio C Hamano 2a7d63a245 Merge branch 'ds/bitmap-lookup-remove-tracing'
Perf-fix.

* ds/bitmap-lookup-remove-tracing:
  pack-bitmap: remove trace2 region from hot path
2022-09-26 21:46:51 -07:00
Derrick Stolee 89a1ab8fb5 pack-bitmap: remove trace2 region from hot path
The trace2 region around the call to lazy_bitmap_for_commit() in
bitmap_for_commit() was added in 28cd730680 (pack-bitmap: prepare to
read lookup table extension, 2022-08-14). While adding trace2 regions is
typically helpful for tracking performance, this method is called
possibly thousands of times as a commit walk explores commit history
looking for a matching bitmap. When trace2 output is enabled, this
region is emitted many times and performance is throttled by that
output.

For now, remove these regions entirely.

This is a critical path, and it would be valuable to measure that the
time spent in bitmap_for_commit() does not increase when using the
commit lookup table. The best way to do that would be to use a mechanism
that sums the time spent in a region and reports a single value at the
end of the process. This technique was introduced but not merged by [1]
so maybe this example presents some justification to revisit that
approach.

[1] https://lore.kernel.org/git/pull.1099.v2.git.1640720202.gitgitgadget@gmail.com/

To help with the 'git blame' output in this region, add a comment that
warns against adding a trace2 region. Delete a test from t5310 that used
that trace output to check that this lookup optimization was activated.
To create this kind of test again in the future, the stopwatch traces
mentioned earlier could be used as a signal that we activated this code
path.

Helpedy-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-26 12:09:18 -07:00
Peter Krefting 33ccfd1e5b l10n: sv.po: Update Swedish translation (5484t0f0u)
Also fix a couple of typos.

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2022-09-26 06:36:23 +01:00
Jordi Mas 6c9165c07a l10n: Update Catalan translation
Signed-off-by: Jordi Mas <jmas@softcatala.org>
2022-09-25 21:04:22 +02:00
Jiang Xin 54e1f9f66d Merge branch 'main' of github.com:git/git
* 'main' of github.com:git/git:
  cmd-list.perl: fix identifying man sections
  pack-bitmap: improve grammar of "xor chain" error message
2022-09-24 21:51:06 +08:00
Jiang Xin 456a75f814 Merge branch 'fr_quickfix' of github.com:jnavila/git
* 'fr_quickfix' of github.com:jnavila/git:
  l10n: fr: don't say that merge is "the default strategy"
2022-09-24 21:12:37 +08:00
Jiang Xin 9865dce557 Merge branch 'po-id' of github.com:bagasme/git-po
* 'po-id' of github.com:bagasme/git-po:
  l10n: po-id for 2.38 (round 2)
2022-09-24 21:09:22 +08:00
Jiang Xin 1d8177c6fa Merge branch 'turkish' of github.com:bitigchi/git-po
* 'turkish' of github.com:bitigchi/git-po:
  l10n: tr: v2.38.0 round 2
2022-09-24 21:08:11 +08:00
Alex Henrie d1e76d5ddc l10n: fr: don't say that merge is "the default strategy"
The text of this message was changed in commit
71076d0edd to avoid making any
suggestion about which strategy is better for the situation at hand.
Update the Franch translation to match.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
2022-09-23 20:42:58 +02:00
Junio C Hamano 4fd6c5e444 Merge branch 'ac/bitmap-lookup-table'
Grammofix.

* ac/bitmap-lookup-table:
  pack-bitmap: improve grammar of "xor chain" error message
2022-09-23 11:07:49 -07:00
Junio C Hamano 0d14f80f94 Merge branch 'ma/scalar-to-main-fix'
Fix manpage generation.

* ma/scalar-to-main-fix:
  cmd-list.perl: fix identifying man sections
2022-09-23 11:07:48 -07:00
Martin Ågren 32c6fff4b8 cmd-list.perl: fix identifying man sections
We attribute each documentation text file to a man section by finding a
line in the file that looks like "gitfoo(<digit>)". Commit cc75e556a9
("scalar: add to 'git help -a' command list", 2022-09-02) updated this
logic to look not only for "gitfoo" but also "scalarfoo". In doing so,
it forgot to account for the fact that after the updated regex has found
a match, the man section is no longer to be found in `$1` but now lives
in `$2`.

This makes our git(1) manpage look as follows:

  Main porcelain commands
       git-add(git)
           Add file contents to the index.

  [...]

       gitk(git)
           The Git repository browser.

       scalar(scalar)
           A tool for managing large Git repositories.

Restore the man sections by not capturing the (git|scalar) part of the
match into `$1`.

As noted by Ævar [1], we could even match any "foo" rather than just
"gitfoo" and "scalarfoo", but that's a larger change. For now, just fix
the regression in cc75e556a9.

[1] https://lore.kernel.org/git/220923.86wn9u4joo.gmgdl@evledraar.gmail.com/#t

Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-23 10:01:07 -07:00
Alex Henrie 711340c797 pack-bitmap: improve grammar of "xor chain" error message
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-23 08:54:05 -07:00
Fangyi Zhou d5be499eed
l10n: zh_CN v2.38.0 rounds 1 & 2
Reviewed-by: Jiang Xin <worldhello.net@gmail.com>
Reviewed-by: Li Linchao <lilinchao@oschina.cn>
Reviewed-by: 依云 <lilydjwg@gmail.com>
Signed-off-by: Fangyi Zhou <me@fangyi.io>
2022-09-23 14:53:24 +01:00
Bagas Sanjaya d4df8609f3 l10n: po-id for 2.38 (round 2)
Update following components:

  * branch.c
  * builtin/log.c
  * builtin/rebase.c
  * builtin/remote.c
  * builtin/reset.c
  * builtin/rev-list.c
  * builtin/rev-parse.c
  * builtin/revert.c
  * builtin/sparse-checkout.c
  * builtin/submodule--helper.c
  * command-list.h
  * help.c
  * merge.c

Translate following new components:

  * builtin/check-attr.c
  * builtin/check-ignore.c
  * builtin/check-mailmap.c
  * builtin/column.c
  * builtin/credential-cache--daemon.c
  * builtin/credential-cache.c
  * builtin/credential-store.c
  * builtin/diagnose.c
  * builtin/env--helper.c
  * builtin/fsmonitor--daemon.c
  * builtin/interpret-trailers.c
  * builtin/mailinfo.c
  * builtin/mailsplit.c
  * builtin/mktag.c
  * builtin/mktree.c
  * builtin/pack-redundant.c
  * builtin/replace.c
  * builtin/rerere.c
  * builtin/stripspace.c
  * bulk-checkin.c
  * commit.c
  * credential.c
  * fsmonitor-ipc.c
  * fsmonitor-settings.c
  * http-fetch.c
  * http.c

Also remove unused strings.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
2022-09-23 20:02:42 +07:00
Emir SARI 20f5a4f114 l10n: tr: v2.38.0 round 2
Signed-off-by: Emir SARI <emir_sari@icloud.com>
2022-09-23 13:10:04 +03:00
Alexander Shopov 471ae3e297 l10n: bg.po: Updated Bulgarian translation (5484t)
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2022-09-23 11:21:03 +02:00
Jiang Xin f2d1418080 Merge branch 'fr_v2.38_rnd2' of github.com:jnavila/git
* 'fr_v2.38_rnd2' of github.com:jnavila/git:
  l10n: fr: v2.38.0 round 2
  l10n: fr: v2.38 round 1
  l10n: fr: The word 'branche' is only feminine
2022-09-23 17:06:12 +08:00
Jiang Xin f5e09d5711 Merge branch 'catalan' of github.com:Softcatala/git-po
* 'catalan' of github.com:Softcatala/git-po:
  l10n: Update Catalan translation
2022-09-23 16:58:14 +08:00
Jiang Xin e3be58c005 Merge branch 'l10n-de-2.38' of github.com:ralfth/git
* 'l10n-de-2.38' of github.com:ralfth/git:
  l10n: de.po: update German translation
2022-09-23 16:51:23 +08:00
Jiang Xin eb0d781094 Merge branch 'main' of github.com:git/git
* 'main' of github.com:git/git:
  list-objects-filter: initialize sub-filter structs
  Git 2.38-rc1
  Final batch before -rc1
  builtin/diagnose.c: don't translate the two mode values
  t/Makefile: remove 'test-results' on 'make clean'
  gc: don't translate literal commands
  Documentation: clean up various typos in technical docs
  Documentation: clean up a few misspelled word typos
  version: fix builtin linking & documentation
  diagnose: add to command-list.txt
  Documentation: add ReviewingGuidelines
  commit-graph: Fix missing closedir in expire_commit_graphs
  diagnose.c: refactor to safely use 'd_type'
  help: fix doubled words in explanation for developer interfaces
  api docs: link to html version of api-trace2
  docs: fix a few recently broken links
  reftable: use a pointer for pq_entry param
2022-09-23 16:50:32 +08:00
Junio C Hamano 4b79ee4b0c Merge branch 'jk/list-objects-filter-cleanup'
Fix uninitialized memory access in a recent fix-up that is already
in -rc1.

* jk/list-objects-filter-cleanup:
  list-objects-filter: initialize sub-filter structs
2022-09-22 15:30:47 -07:00
Jean-Noël Avila d5e81315d2 l10n: fr: v2.38.0 round 2
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
2022-09-22 21:52:26 +02:00
Jean-Noël Avila 77532d041a l10n: fr: v2.38 round 1
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
2022-09-22 21:52:26 +02:00
Hubert Bossot 97db13f26c l10n: fr: The word 'branche' is only feminine
Signed-off-by: hbossot <hbossot@profideo.com>
2022-09-22 21:52:04 +02:00
Jeff King 4eaed7c2f2 list-objects-filter: initialize sub-filter structs
Since commit c54980ab83 (list-objects-filter: convert filter_spec to a
strbuf, 2022-09-11), building with SANITIZE=undefined triggers an error
in t5616.

The problem is that we end up with a strbuf that has been
zero-initialized instead of via STRBUF_INIT. Feeding that strbuf to
strbuf_addbuf() in list_objects_filter_copy() means we will call memcpy
like:

   memcpy(some_actual_buffer, NULL, 0);

This works on most systems because we're copying zero bytes, but it is
technically undefined behavior to ever pass NULL to memcpy.

Even though c54980ab83 is where the bug manifests, that is only because
we switched away from a string_list, which is OK with being
zero-initialized (though it may cause other problems by not duplicating
the strings, it happened to be OK in this instance).

The actual bug is caused by the commit before that, 2a01bdedf8
(list-objects-filter: add and use initializers, 2022-09-11). There we
consistently initialize the top-level filter structs, but we forgot the
dynamically allocated ones we stick in filter_options->sub when creating
combined filters.

Note that we need to fix two spots here: where we parse a "combine:"
filter, but also where we transform from a single-filter into a combined
one after seeing multiple "--filter" options. In the second spot, we'll
do some minor refactoring to avoid repeating our very-long array index.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-22 12:43:04 -07:00
Jordi Mas aa923f75a6 l10n: Update Catalan translation
Signed-off-by: Jordi Mas <jmas@softcatala.org>
2022-09-22 18:30:42 +02:00