aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2023-05-23t7110-reset-merge: modernize test formatJohn Cai1-157/+157
Some tests still use the old format with four spaces indentation. Standardize the tests to the new format with tab indentation. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-22l10n: Update German translationRalf Thielow1-565/+317
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Reviewed-by: Matthias Rüster <matthias.ruester@gmail.com>
2023-05-22l10n: po-id for 2.41 (round 1)Bagas Sanjaya1-232/+383
Update following components: * advice.c * archive.c * attr.c * config.c * pack-revindex.c * builtin/branch.c * builtin/bundle.c * builtin/pack-redundant.c * builtin/rebase.c * builtin/sparse-checkout.c Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
2023-05-20l10n: Update Catalan translationJordi Mas1-576/+309
Signed-off-by: Jordi Mas <jmas@softcatala.org>
2023-05-20l10n: tr: Update Turkish translations for 2.41.0Emir SARI1-185/+306
Signed-off-by: Emir SARI <emir_sari@icloud.com>
2023-05-20l10n: fr.po v2.41.0 rnd2Jean-Noël Avila1-8/+8
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
2023-05-20l10n: fr.po v2.41.0 rnd1Jean-Noël Avila1-186/+330
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
2023-05-20l10n: fr: fix translation of stash save helpBenjamin Jorand1-1/+1
Signed-off-by: Benjamin Jorand <benjamin.jorand@doctolib.com>
2023-05-20l10n: zh_CN: Git 2.41.0 round #1Teng Long2-231/+378
Signed-off-by: Teng Long <dyroneteng@gmail.com> Reviewed-by: Jiang Xin <zhiyou.jx@alibaba-inc.com> Reviewed-by: 依云 <lilydjwg@gmail.com> Reviewed-by: pan93412 <pan93412@gmail.com> Reviewed0by: Fangyi Zhou <me@fangyi.io>
2023-05-20Merge branch 'master' of github.com:git/gitJiang Xin36-55/+292
* 'master' of github.com:git/git: A few more topics after 2.41-rc1 Git 2.41-rc1 t/lib-httpd: make CGIPassAuth support conditional t9001: mark the script as no longer leak checker clean send-email: clear the $message_id after validation upload-pack: advertise capabilities when cloning empty repos A bit more before -rc1 imap-send: include strbuf.h run-command.c: fix missing include under `NO_PTHREADS` test: do not negate test_path_is_* to assert absense t2021: do not negate test_path_is_dir tests: do not negate test_path_exists doc/git-config: add unit for http.lowSpeedLimit rebase -r: fix the total number shown in the progress rebase --update-refs: fix loops attr: teach "--attr-source=<tree>" global option to "git"
2023-05-20A few more topics after 2.41-rc1Junio C Hamano2-1/+5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-20Merge branch 'js/rebase-count-fixes'Junio C Hamano2-5/+16
A few bugs in the sequencer machinery that results in miscounting the steps have been corrected. * js/rebase-count-fixes: rebase -r: fix the total number shown in the progress rebase --update-refs: fix loops
2023-05-20Merge branch 'jc/do-not-negate-test-helpers'Junio C Hamano5-7/+7
Small fixes. * jc/do-not-negate-test-helpers: test: do not negate test_path_is_* to assert absense t2021: do not negate test_path_is_dir tests: do not negate test_path_exists
2023-05-20Merge branch 'cg/doc-http-lowspeed-limit'Junio C Hamano1-2/+3
Doc update. * cg/doc-http-lowspeed-limit: doc/git-config: add unit for http.lowSpeedLimit
2023-05-19l10n: bg.po: Updated Bulgarian translation (5515t)Alexander Shopov1-186/+314
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2023-05-19t7101-reset-empty-subdirs: modernize test formatJohn Cai1-24/+24
Some tests still use the old format with four spaces indentation. Standardize the tests to the new format with tab indentation. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19t6050-replace: modernize test formatJohn Cai1-148/+148
Some tests still use the old format with four spaces indentation. Standardize the tests to the new format with tab indentation. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19t5306-pack-nobase: modernize test formatJohn Cai1-49/+45
Some tests still use the old format with four spaces indentation. Standardize the tests to the new format with tab indentation. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19t5303-pack-corruption-resilience: modernize test formatJohn Cai1-292/+292
Some tests still use the old format with four spaces indentation. Standardize the tests to the new format with tab indentation. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19t5301-sliding-window: modernize test formatJohn Cai1-50/+50
Some tests still use the old format with four spaces indentation. Standardize the tests to the new format with tab indentation. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19t5300-pack-object: modernize test formatJohn Cai1-92/+92
Some tests still use the old format with four spaces indentation. Standardize the tests to the new format with tab indentation. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19t4206-log-follow-harder-copies: modernize test formatJohn Cai1-18/+18
Some tests still use the old format with four spaces indentation. Standardize the tests to the new format with tab indentation. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19t4202-log: modernize test formatJohn Cai1-4/+4
Some tests still use the old format with four spaces indentation. Standardize the tests to the new format with tab indentation. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19t4004-diff-rename-symlink: modernize test formatJohn Cai1-21/+21
Some tests still use the old format with four spaces indentation. Standardize the tests to the new format with tab indentation. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19t4003-diff-rename-1: modernize test formatJohn Cai1-31/+31
Some tests still use the old format with four spaces indentation. Standardize the tests to the new format with tab indentation. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19t4002-diff-basic: modernize test formatJohn Cai1-122/+121
Some tests still use the old format with four spaces indentation. Standardize the tests to the new format with tab indentation. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19t3903-stash: modernize test formatJohn Cai1-13/+13
Some tests still use the old format with four spaces indentation. Standardize the tests to the new format with tab indentation. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19t3700-add: modernize test formatJohn Cai1-17/+17
Some tests still use the old format with four spaces indentation. Standardize the tests to the new format with tab indentation. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19t3500-cherry: modernize test formatJohn Cai1-36/+33
Some tests still use the old format with four spaces indentation. Standardize the tests to the new format with tab indentation. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19t1006-cat-file: modernize test formatJohn Cai1-13/+13
Some tests in t1006-cat-file.sh used the older four space indent format. Update these to use tabs. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19t1002-read-tree-m-u-2way: modernize test formatJohn Cai1-296/+293
Some tests are still using the older four space indent format. Update these to use tabs. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19t1001-read-tree-m-2way: modernize test formatJohn Cai1-1/+1
Some tests are still using the older four space indent format. Update these to use tabs. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19t3210-pack-refs: modernize test formatJohn Cai1-77/+77
Some tests in t3210-pack-refs.sh used the older four space indent format. Update these to use tabs. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19t0030-stripspace: modernize test formatJohn Cai1-289/+271
Some tests in t0030-stripspace.sh used the older four space indent format. Update these to use tabs. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19t0000-basic: modernize test formatJohn Cai1-1/+1
Some tests in t0000-basic.sh used the older four space indent format. Update these to use tabs. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19format-patch: free elements of rev.ref_message_ids listJeff King1-7/+7
When we are showing multiple patches with format-patch, we have to repeatedly overwrite the rev.message_id field. We take care to avoid leaking the old value by either freeing it, or adding it to ref_message_ids, a string list of ids to reference in subsequent messages. But unfortunately we do leak the value via that string list. We try to clear the string list, courtesy of 89f45cf4eb (format-patch: don't leak "extra_headers" or "ref_message_ids", 2022-04-13). But since it was initialized as "nodup", the string list doesn't realize it owns the strings, and it leaks them. We have two options here: 1. Continue to init with "nodup", but then tweak the value of ref_message_ids.strdup_strings just before clearing. 2. Init with "dup", but use "append_nodup" when transferring ownership of strings to the list. Clearing just works. I picked the second here, as I think it calls attention to the tricky part (transferring ownership via the nodup call). There's one other related fix we have to do, though. We also insert the result of clean_message_id() into the list. This _sometimes_ allocates and sometimes does not, depending on whether we have to remove cruft from the end of the string. Let's teach it to consistently return an allocated string, so that the caller knows it must be freed. There's no new test here, as the leak can already be seen in t4014.44 (as well as others in that script). We can't mark all of t4014 as leak-free, though, as there are other unrelated leaks that it triggers. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19Git 2.41-rc1v2.41.0-rc1Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19Merge branch 'jk/http-test-cgipassauth-unavailable-in-older-apache'Junio C Hamano3-0/+22
We started unconditionally testing with CGIPassAuth directive but it is unavailable in older Apache that ships with CentOS 7 that has about a year of shelf-life still left. The test has conditionally been disabled when running with an ancient Apache. This was a fix for a recent regression caught before the release, so no need to mention it in the release notes. * jk/http-test-cgipassauth-unavailable-in-older-apache: t/lib-httpd: make CGIPassAuth support conditional
2023-05-19Merge branch 'bc/clone-empty-repo-via-protocol-v0'Junio C Hamano3-7/+73
The server side of "git clone" now advertises the necessary hints to clients to help them to clone from an empty repository and learn object hash algorithm and the (unborn) branch pointed at by HEAD, even over the older v0/v1 protocol. * bc/clone-empty-repo-via-protocol-v0: upload-pack: advertise capabilities when cloning empty repos
2023-05-19Merge branch 'jc/send-email-pre-process-fix'Junio C Hamano2-2/+18
When "git send-email" that uses the validate hook is fed a message without and then with Message-ID, it failed to auto-assign a unique Message-ID to the former and instead reused the Message-ID from the latter, which has been corrected. This was a fix for a recent regression caught before the release, so no need to mention it in the release notes. * jc/send-email-pre-process-fix: t9001: mark the script as no longer leak checker clean send-email: clear the $message_id after validation
2023-05-19Merge branch 'tb/run-command-needs-alloc-h'Junio C Hamano1-0/+1
Fix the build problem with NO_PTHREADS defined, a fallout from recent header file shuffling. * tb/run-command-needs-alloc-h: run-command.c: fix missing include under `NO_PTHREADS`
2023-05-19ls-remote doc: document the output formatSean Allred1-0/+26
While well-established, the output format of ls-remote was not actually documented. This patch adds an OUTPUT section to the documentation following the format of git-show-ref.txt (which has similar semantics). Add a basic example immediately after this to solidify the 'normal' output format. Signed-off-by: Sean Allred <allred.sean@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19ls-remote doc: explain what each example doesSean Allred1-2/+7
While it's good to have several examples to solidify the output pattern and generally demonstrate how to use the command, most other EXAMPLES sections (e.g., git-show-branch.txt, git-remote.txt) additionally describe the problem/situation to which the example is applicable. Follow this example in the ls-remote documentation. Signed-off-by: Sean Allred <allred.sean@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19ls-remote doc: show peeled tags in examplesSean Allred1-4/+4
Without `--refs`, this command will show peeled tags. Make this clearer in the examples to further mitigate the possibility of surprises in consuming scripts. Signed-off-by: Sean Allred <allred.sean@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19ls-remote doc: remove redundant --tags exampleSean Allred1-7/+0
The --tags option is already demonstrated in the later example that lists version-patterned tags. As it doesn't appear to add anything to the documentation, it ought to be removed to keep the documentation easier to read. Signed-off-by: Sean Allred <allred.sean@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19show-branch doc: say <ref>, not <reference>Junio C Hamano1-8/+8
The glossary defines 'ref' as the official name of the thing, and the output from "git grep -e '<ref' Documentation/" shows that most everybody uses <ref>, not <reference>. In addition, the page already says <ref> in its SYNOPSIS section for the command when it is used in the mode to follow the reflogs. Strictly speaking, many references of these should be updated to <commit> after adding an explanation on how these <commit>s are discovered (i.e. we take <rev>, <glob>, or <ref> and starting from these commits, follow their ancestry or reflog entries to list commits), but that would be a lot bigger change I would rather not to do in this patch, whose primary purpose is to make the existing documentation more consistent. Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Sean Allred <allred.sean@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-19show-ref doc: update for internal consistencySean Allred1-14/+26
- Use inline-code syntax for options where appropriate. - Use code blocks to clarify output format. - Use 'OID' (for 'object ID') instead of 'SHA-1' as we support different hashing algorithms these days. Signed-off-by: Sean Allred <allred.sean@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-18format-patch: free rev.message_id when exitingJeff King2-1/+2
We may allocate a message-id string via gen_message_id(), but we never free it, causing a small leak. This can be demonstrated by running t9001 with a leak-checking build. The offending test is the one touched by 3ece9bf0f9 (send-email: clear the $message_id after validation, 2023-05-17), but the leak is much older than that. The test was simply unlucky enough to trigger the leaking code path for the first time. We can fix this by freeing the string at the end of the function. We can also re-mark the test script as leak-free, effectively reverting 20bd08aefb (t9001: mark the script as no longer leak checker clean, 2023-05-17). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-18t/lib-httpd: make CGIPassAuth support conditionalJeff King3-0/+22
Commit 988aad99b4 (t5563: add tests for basic and anoymous HTTP access, 2023-02-27) added tests that require Apache to support the CGIPassAuth directive, which was added in Apache 2.4.13. This is fairly old (~8 years), but recent enough that we still encounter it in the wild (e.g., RHEL/CentOS 7, which is not EOL until June 2024). We can live with skipping the new tests on such a platform. But unfortunately, since the directive is used unconditionally in our apache.conf, it means the web server fails to start entirely, and we cannot run other HTTP tests at all (e.g., the basic ones in t5551). We can fix that by making the config conditional, and only triggering it for t5563. That solves the problem for t5551 (which then ignores the directive entirely). For t5563, we'd see apache complain in start_httpd; with the default setting of GIT_TEST_HTTPD, we'd then skip the whole script. But that leaves one small problem: people may set GIT_TEST_HTTPD=1 explicitly, which instructs the tests to fail (rather than skip) when we can't start the webserver (to avoid accidentally missing some tests). This could be worked around by having the user manually set GIT_SKIP_TESTS on a platform with an older Apache. But we can be a bit friendlier by doing the version check ourselves and setting an appropriate prereq. We'll use the (lack of) prereq to then skip the rest of t5563. In theory we could use the prereq to skip individual tests, but in practice this whole script depends on it. Reported-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-18diff-tree: integrate with sparse indexShuqi Liang3-0/+48
The index is read in 'cmd_diff_tree' at two points: 1. The first index read was added in fd66bcc31ff (diff-tree: read the index so attribute checks work in bare repositories, 2017-12-06) to deal with reading '.gitattributes' content. 77efbb366ab (attr: be careful about sparse directories, 2021-09-08) established that, in a sparse index, we do _not_ try to load a '.gitattributes' file from within a sparse directory. 2. The second index access point is involved in rename detection, specifically when reading from stdin.This was initially added in f0c6b2a2fd9 ([PATCH] Optimize diff-tree -[CM]--stdin, 2005-05-27), where 'setup' was set to 'DIFF_SETUP_USE_SIZE_CACHE |DIFF_SETUP_USE_CACHE'. That assignment was later modified to drop the'DIFF_SETUP_USE_CACHE' in ff7fe37b053 (diff.c: move read_index() code back to the caller, 2018-08-13).However, 'DIFF_SETUP_USE_SIZE_CACHE' seems to be unused as of 6e0b8ed6d35 (diff.c: do not use a separate "size cache"., 2007-05-07) and nothing about 'detect_rename' otherwise indicates index usage. Hence we can just set the requires-full-index to false for "diff-tree". Add tests that verify that 'git diff-tree' behaves correctly when the sparse index is enabled and test to ensure the index is not expanded. The `p2000` tests demonstrate a ~98% execution time reduction for 'git diff-tree' using a sparse index: Test before after ----------------------------------------------------------------------- 2000.94: git diff-tree HEAD (full-v3) 0.05 0.04 -20.0% 2000.95: git diff-tree HEAD (full-v4) 0.06 0.05 -16.7% 2000.96: git diff-tree HEAD (sparse-v3) 0.59 0.01 -98.3% 2000.97: git diff-tree HEAD (sparse-v4) 0.61 0.01 -98.4% 2000.98: git diff-tree HEAD -- f2/f4/a (full-v3) 0.05 0.05 +0.0% 2000.99: git diff-tree HEAD -- f2/f4/a (full-v4) 0.05 0.04 -20.0% 2000.100: git diff-tree HEAD -- f2/f4/a (sparse-v3) 0.58 0.01 -98.3% 2000.101: git diff-tree HEAD -- f2/f4/a (sparse-v4) 0.55 0.01 -98.2% Helped-by: Victoria Dye <vdye@github.com> Signed-off-by: Shuqi Liang <cheskaqiqi@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>