summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* sha256: avoid functions deprecated in OpenSSL 3+Eric Wong2023-08-013-1/+57
| | | | | | | | | | | OpenSSL 3+ deprecates the SHA256_Init, SHA256_Update, and SHA256_Final functions, leading to errors when building with `DEVELOPER=1'. Use the newer EVP_* API with OpenSSL 3+ despite being more error-prone and less efficient due to heap allocations. Signed-off-by: Eric Wong <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'jk/redact-h2h3-headers-fix' into maint-2.41Junio C Hamano2023-06-251-1/+2
|\ | | | | | | | | * jk/redact-h2h3-headers-fix: http: handle both "h2" and "h2h3" in curl info lines
| * http: handle both "h2" and "h2h3" in curl info linesJeff King2023-06-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When redacting auth tokens in trace output from curl, we look for http/2 headers of the form "h2h3 [header: value]". This comes from b637a41ebe (http: redact curl h2h3 headers in info, 2022-11-11). But the "h2h3" prefix changed to just "h2" in curl's fc2f1e547 (http2: support HTTP/2 to forward proxies, non-tunneling, 2023-04-14). That's in released version curl 8.1.0; linking against that version means we'll fail to correctly redact the trace. Our t5559.17 notices and fails. We can fix this by matching either prefix, which should handle both old and new versions. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Git 2.41v2.41.0Junio C Hamano2023-06-011-1/+1
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge tag 'l10n-2.41.0-2' of https://github.com/git-l10n/git-poJunio C Hamano2023-06-0111-3538/+25715
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | l10n-2.41.0-2 * tag 'l10n-2.41.0-2' of https://github.com/git-l10n/git-po: l10n: zh_TW.po: Git 2.41.0 l10n: sv.po: Update Swedish translation (5515t0f0u) l10n: Update Catalan translation l10n: Update German translation l10n: po-id for 2.41 (round 1) l10n: Update Catalan translation l10n: tr: Update Turkish translations for 2.41.0 l10n: fr.po v2.41.0 rnd2 l10n: fr.po v2.41.0 rnd1 l10n: fr: fix translation of stash save help l10n: zh_CN: Git 2.41.0 round #1 l10n: bg.po: Updated Bulgarian translation (5515t) l10n: update uk localization l10n: uk: remove stale lines l10n: uk: add initial translation l10n: TEAMS: Update pt_PT repo link
| * | l10n: zh_TW.po: Git 2.41.0Yi-Jyun Pan2023-05-311-1191/+1512
| | | | | | | | | | | | | | | Co-authored-by: Peter Dave Hello <hsu@peterdavehello.org> Signed-off-by: Yi-Jyun Pan <pan93412@gmail.com>
| * | Merge branch 'add-uk-initial-l10n' of github.com:arkid15r/git-ukrainian-l10nJiang Xin2023-05-312-0/+21559
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | * 'add-uk-initial-l10n' of github.com:arkid15r/git-ukrainian-l10n: l10n: update uk localization l10n: uk: remove stale lines l10n: uk: add initial translation
| | * | l10n: update uk localizationArkadii Yakovets2023-05-171-1129/+1869
| | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Kate Golovanova <kate@kgthreads.com> Signed-off-by: Arkadii Yakovets <ark@cho.red> Signed-off-by: Kate Golovanova <kate@kgthreads.com>
| | * | l10n: uk: remove stale linesArkadii Yakovets2023-04-121-31/+0
| | | | | | | | | | | | | | | | Signed-off-by: Arkadii Yakovets <ark@cho.red>
| | * | l10n: uk: add initial translationArkadii Yakovets2023-04-122-0/+20850
| | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Kate Golovanova <kate@kgthreads.com> Signed-off-by: Arkadii Yakovets <ark@cho.red> Signed-off-by: Kate Golovanova <kate@kgthreads.com>
| * | | l10n: sv.po: Update Swedish translation (5515t0f0u)Peter Krefting2023-05-311-180/+301
| | | | | | | | | | | | | | | | Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
| * | | l10n: Update Catalan translationJordi Mas2023-05-261-5/+5
| | | | | | | | | | | | | | | | Signed-off-by: Jordi Mas <jmas@softcatala.org>
| * | | Merge branch 'l10n-de-2.41' of github.com:ralfth/gitJiang Xin2023-05-251-565/+317
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * 'l10n-de-2.41' of github.com:ralfth/git: l10n: Update German translation
| | * | | l10n: Update German translationRalf Thielow2023-05-221-565/+317
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Reviewed-by: Matthias Rüster <matthias.ruester@gmail.com>
| * | | | Merge branch 'catalan' of github.com:Softcatala/git-poJiang Xin2023-05-251-576/+309
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * 'catalan' of github.com:Softcatala/git-po: l10n: Update Catalan translation
| | * | | | l10n: Update Catalan translationJordi Mas2023-05-201-576/+309
| | |/ / / | | | | | | | | | | | | | | | Signed-off-by: Jordi Mas <jmas@softcatala.org>
| * | | | Merge branch 'tr' of github.com:bitigchi/git-poJiang Xin2023-05-251-185/+306
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * 'tr' of github.com:bitigchi/git-po: l10n: tr: Update Turkish translations for 2.41.0
| | * | | | l10n: tr: Update Turkish translations for 2.41.0Emir SARI2023-05-201-185/+306
| | |/ / / | | | | | | | | | | | | | | | Signed-off-by: Emir SARI <emir_sari@icloud.com>
| * | | | Merge branch 'main' of github.com:alshopov/git-poJiang Xin2023-05-251-186/+314
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * 'main' of github.com:alshopov/git-po: l10n: bg.po: Updated Bulgarian translation (5515t)
| | * | | | l10n: bg.po: Updated Bulgarian translation (5515t)Alexander Shopov2023-05-191-186/+314
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Alexander Shopov <ash@kambanaria.org>
| * | | | | Merge branch 'fr_2.41.0_rnd1' of github.com:jnavila/gitJiang Xin2023-05-251-187/+331
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'fr_2.41.0_rnd1' of github.com:jnavila/git: l10n: fr.po v2.41.0 rnd2 l10n: fr.po v2.41.0 rnd1 l10n: fr: fix translation of stash save help
| | * | | | | l10n: fr.po v2.41.0 rnd2Jean-Noël Avila2023-05-201-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
| | * | | | | l10n: fr.po v2.41.0 rnd1Jean-Noël Avila2023-05-201-186/+330
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
| | * | | | | l10n: fr: fix translation of stash save helpBenjamin Jorand2023-05-201-1/+1
| | | |/ / / | | |/| | | | | | | | | | | | | | | Signed-off-by: Benjamin Jorand <benjamin.jorand@doctolib.com>
| * | | | | Merge branch 'po-id' of github.com:bagasme/git-poJiang Xin2023-05-251-232/+383
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'po-id' of github.com:bagasme/git-po: l10n: po-id for 2.41 (round 1)
| | * | | | | l10n: po-id for 2.41 (round 1)Bagas Sanjaya2023-05-221-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>
| * | | | | Merge branch 'tl/zh_CN_2.41.0_rnd1' of github.com:dyrone/gitJiang Xin2023-05-252-231/+378
| |\ \ \ \ \ | | |/ / / / | |/| | | | | | | | | | | | | | | | * 'tl/zh_CN_2.41.0_rnd1' of github.com:dyrone/git: l10n: zh_CN: Git 2.41.0 round #1
| | * | | | l10n: zh_CN: Git 2.41.0 round #1Teng Long2023-05-202-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>
| * | | | | Merge branch 'master' of github.com:git/gitJiang Xin2023-05-2036-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"
| * | | | | Merge tag 'v2.41.0-rc0'Jiang Xin2023-05-16804-7037/+14318
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Git 2.41-rc0 * tag 'v2.41.0-rc0': (508 commits) Git 2.41-rc0 t5583: fix shebang line merge-tree: load default git config fetch: introduce machine-parseable "porcelain" output format fetch: move option related variables into main function fetch: lift up parsing of "fetch.output" config variable fetch: introduce `display_format` enum fetch: refactor calculation of the display table width fetch: print left-hand side when fetching HEAD:foo fetch: add a test to exercise invalid output formats fetch: split out tests for output format fetch: fix `--no-recurse-submodules` with multi-remote fetches The eighteenth batch The seventeenth batch diff-files: integrate with sparse index t1092: add tests for `git diff-files` test: rev-parse-upstream: add missing cmp t: drop "verbose" helper function t7001: use "ls-files --format" instead of "cut" t7001: avoid git on upstream of pipe ...
| * | | | | | l10n: TEAMS: Update pt_PT repo linkDaniel Santos2023-04-031-1/+1
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* | | | | | Git 2.41-rc2v2.41.0-rc2Junio C Hamano2023-05-242-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'sl/sparse-write-tree-part-2'Junio C Hamano2023-05-241-4/+14
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix-up to a topic already graduated to 'master'. * sl/sparse-write-tree-part-2: t1092: update a write-tree test
| * | | | | t1092: update a write-tree testShuqi Liang2023-05-081-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'on all' in the title of the test 'write-tree on all' was unclear; remove it. * Add a baseline 'test_all_match git write-tree' before making any changes to the index, providing a reference point for the 'write-tree' prior to any modifications. * Add a comparison of the output of 'git status --porcelain=v2' to test the working tree after 'write-tree' exits. * Ensure SKIP_WORKTREE files weren't materialized on disk by using "test_path_is_missing". Signed-off-by: Shuqi Liang <cheskaqiqi@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | A few more topics after 2.41-rc1Junio C Hamano2023-05-192-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'js/rebase-count-fixes'Junio C Hamano2023-05-192-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
| * | | | | | rebase -r: fix the total number shown in the progressJohannes Schindelin2023-05-152-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For regular, non-`--rebase-merges` runs, there is very little work to do for the parser when determining the total number of commands in a rebase script: it is simply the number of lines after stripping the commented lines and then trimming the trailing empty line, if any. The `--rebase-merges` mode complicates things by introducing empty lines and comments in the middle of the script. These should _not_ be counted as commands, and indeed, when an interactive rebase is interrupted and subsequently resumed, the total number of commands can magically shrink, sometimes dramatically. The reason for this strange behavior is that empty lines _are_ counted in `edit_todo_list()` (but not the comments, as they are stripped via `strbuf_stripspace(..., 1)`, which is a bug. Let's fix this so that the correct total number is shown from the get-go, by carefully adjusting it according to what's in the rebase script. Extra care needs to be taken in case the user edits the script: the number of commands might be different after the user edited than beforehand. Note: Even though commented lines are skipped in `edit_todo_list()`, we still need to handle `TODO_COMMENT` items by decrementing the already-incremented `total_nr` again: empty lines are also marked as `TODO_COMMENT`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Acked-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | rebase --update-refs: fix loopsJohannes Schindelin2023-05-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `total_nr` field in the `todo_list` structure merely serves display purposes, and should only be used when generating the progress message. In these two instances, however, we want to loop over all of the commands in the parsed rebase script. The loop limit therefore needs to be `nr`, which refers to the count of commands in the current `todo_list`. This is important because the two numbers, `nr` and `total_nr` can differ wildly, e.g. due to `total_nr` _not_ counting comments or empty lines, while `nr` skips any commands that already moved from the `git-rebase-todo` file to the `done` file. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Acked-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'jc/do-not-negate-test-helpers'Junio C Hamano2023-05-195-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
| * | | | | | | test: do not negate test_path_is_* to assert absenseJunio C Hamano2023-05-162-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests use "! test_path_is_dir" or "! test_path_is_file" to ensure that the path is not recursively checked out or "submodule update" did not touch the working tree. Use "test_path_is_missing" to assert that the path does not exist, instead of negating test_path_is_* helpers; they are designed to be loud in wrong occasions. Besides, negating "test_path_is_dir" would mean we would be happy if a file exists there, which is not the case for these tests. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | t2021: do not negate test_path_is_dirJunio C Hamano2023-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this test, a path (some_dir) that is originally a directory is to be removed and then to be replaced with a file of the same name. The expectation is that the path becomes a file at the end. However, "! test_path_is_dir some_dir" is used to catch a breakage that leaves the path as a directory. But as with all the "test_path_is..." helpers, this use of the helper makes it loud when the expectation (i.e. it is a directory) is met, and otherwise is silent when it is not---this does not help debugging. Be more explicit and state that we expect the path to become a file. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | tests: do not negate test_path_existsJunio C Hamano2023-05-162-3/+3
| | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a way to assert the path 'foo' is missing, "! test_path_exists foo" is a poor way to do so, as the helper is designed to complain when 'foo' is missing, but the intention of the author who used negated form was to make sure it does not exist. This does not help debugging the tests. Use test_path_is_missing instead, which is a more appropriate helper. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'cg/doc-http-lowspeed-limit'Junio C Hamano2023-05-191-2/+3
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doc update. * cg/doc-http-lowspeed-limit: doc/git-config: add unit for http.lowSpeedLimit
| * | | | | | doc/git-config: add unit for http.lowSpeedLimitCorentin Garcia2023-05-151-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the unit (bytes per second) for http.lowSpeedLimit in the documentation. Signed-off-by: Corentin Garcia <corenting@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Git 2.41-rc1v2.41.0-rc1Junio C Hamano2023-05-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'jk/http-test-cgipassauth-unavailable-in-older-apache'Junio C Hamano2023-05-193-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
| * | | | | | | t/lib-httpd: make CGIPassAuth support conditionalJeff King2023-05-183-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>
* | | | | | | | Merge branch 'bc/clone-empty-repo-via-protocol-v0'Junio C Hamano2023-05-193-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
| * | | | | | | | upload-pack: advertise capabilities when cloning empty reposbrian m. carlson2023-05-173-7/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When cloning an empty repository, protocol versions 0 and 1 currently offer nothing but the header and flush packets for the /info/refs endpoint. This means that no capabilities are provided, so the client side doesn't know what capabilities are present. However, this does pose a problem when working with SHA-256 repositories, since we use the capabilities to know the remote side's object format (hash algorithm). As of 8b214c2e9d ("clone: propagate object-format when cloning from void", 2023-04-05), this has been fixed for protocol v2, since there we always read the hash algorithm from the remote. Fortunately, the push version of the protocol already indicates a clue for how to solve this. When the /info/refs endpoint is accessed for a push and the remote is empty, we include a dummy "capabilities^{}" ref pointing to the all-zeros object ID. The protocol documentation already indicates this should _always_ be sent, even for fetches and clones, so let's just do that, which means we'll properly announce the hash algorithm as part of the capabilities. This just works with the existing code because we share the same ref code for fetches and clones, and libgit2, JGit, and dulwich do as well. There is one minor issue to fix, though. If we called send_ref with namespaces, we would return NULL with the capabilities entry, which would cause a crash. Instead, let's refactor out a function to print just the ref itself without stripping the namespace and use it for our special capabilities entry. Add several sets of tests for HTTP as well as for local clones. The behavior can be slightly different for HTTP versus a local or SSH clone because of the stateless-rpc functionality, so it's worth testing both. Signed-off-by: brian m. carlson <bk2204@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'jc/send-email-pre-process-fix'Junio C Hamano2023-05-192-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