summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-09-27Git 2.38-rc2v2.38.0-rc2Junio C Hamano
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-26Merge branch 'ds/bitmap-lookup-remove-tracing'Junio C Hamano
Perf-fix. * ds/bitmap-lookup-remove-tracing: pack-bitmap: remove trace2 region from hot path
2022-09-26pack-bitmap: remove trace2 region from hot pathDerrick Stolee
The trace2 region around the call to lazy_bitmap_for_commit() in bitmap_for_commit() was added in 28cd730680d (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-23Merge branch 'ac/bitmap-lookup-table'Junio C Hamano
Grammofix. * ac/bitmap-lookup-table: pack-bitmap: improve grammar of "xor chain" error message
2022-09-23Merge branch 'ma/scalar-to-main-fix'Junio C Hamano
Fix manpage generation. * ma/scalar-to-main-fix: cmd-list.perl: fix identifying man sections
2022-09-23cmd-list.perl: fix identifying man sectionsMartin Ågren
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-23pack-bitmap: improve grammar of "xor chain" error messageAlex Henrie
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-22Merge branch 'jk/list-objects-filter-cleanup'Junio C Hamano
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-22list-objects-filter: initialize sub-filter structsJeff King
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-21Git 2.38-rc1v2.38.0-rc1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-21Merge branch 'sg/parse-options-subcommand'Junio C Hamano
Fix messages incorrectly marked for translation. * sg/parse-options-subcommand: gc: don't translate literal commands
2022-09-21Merge branch 'js/typofix'Junio C Hamano
* js/typofix: Documentation: clean up various typos in technical docs Documentation: clean up a few misspelled word typos
2022-09-21Merge branch 'sg/clean-test-results'Junio C Hamano
"make clean" stopped cleaning the test results directory as a side effect of a topic that has nothing to do with "make clean", which has been corrected. * sg/clean-test-results: t/Makefile: remove 'test-results' on 'make clean'
2022-09-21Merge branch 'vd/check-docs-fixes'Junio C Hamano
Build fix. * vd/check-docs-fixes: version: fix builtin linking & documentation diagnose: add to command-list.txt
2022-09-21Merge branch 'vd/doc-reviewing-guidelines'Junio C Hamano
Just like we have coding guidelines, we now have guidelines for reviewers. * vd/doc-reviewing-guidelines: Documentation: add ReviewingGuidelines
2022-09-21Merge branch 'vd/scalar-generalize-diagnose'Junio C Hamano
Portability fix. * vd/scalar-generalize-diagnose: builtin/diagnose.c: don't translate the two mode values diagnose.c: refactor to safely use 'd_type'
2022-09-21Final batch before -rc1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-21Merge branch 'fz/help-doublofix'Junio C Hamano
Typofix for topic already in -rc0. * fz/help-doublofix: help: fix doubled words in explanation for developer interfaces
2022-09-21Merge branch 'tz/tech-docs-to-help-fix'Junio C Hamano
Docfix for topic already in -rc0. * tz/tech-docs-to-help-fix: api docs: link to html version of api-trace2 docs: fix a few recently broken links
2022-09-21Merge branch 'ml/commit-graph-expire-dir-leak-fix'Junio C Hamano
A result from opendir() was leaking in the commit-graph expiration codepath, which has been plugged. * ml/commit-graph-expire-dir-leak-fix: commit-graph: Fix missing closedir in expire_commit_graphs
2022-09-21Merge branch 'ec/reftable-pass-pq-entry-by-reference'Junio C Hamano
Small code clean-up in reftable implementation. * ec/reftable-pass-pq-entry-by-reference: reftable: use a pointer for pq_entry param
2022-09-21builtin/diagnose.c: don't translate the two mode valuesAlex Henrie
These strings are not translatable in the diagnose_options array in diagnose.c. Don't translate them in builtin/diagnose.c either. Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-21t/Makefile: remove 'test-results' on 'make clean'SZEDER Gábor
The 't/test-results' directory and its contents are by-products of the test process, so 'make clean' should remove them, but, alas, this has been broken since fee65b194d (t/Makefile: don't remove test-results in "clean-except-prove-cache", 2022-07-28). The 'clean' target in 't/Makefile' was not directly responsible for removing the 'test-results' directory, but relied on its dependency 'clean-except-prove-cache' to do that [1]. ee65b194d broke this, because it only removed the 'rm -r test-results' command from the 'clean-except-prove-cache' target instead of moving it to the 'clean' target, resulting in stray 't/test-results' directories. Add that missing cleanup command to 't/Makefile', and to all sub-Makefiles touched by that commit as well. [1] 60f26f6348 (t/Makefile: retain cache t/.prove across prove runs, 2012-05-02) Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-21gc: don't translate literal commandsAlex Henrie
The command you type is still "git maintenance" even in other languages. Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-21Documentation: clean up various typos in technical docsJacob Stopak
Used GNU "aspell check <filename>" to review various technical documentation files with the default aspell dictionary. Ignored false-positives between american and british english. Signed-off-by: Jacob Stopak <jacob@initialcommit.io> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-21Documentation: clean up a few misspelled word typosJacob Stopak
Used GNU "aspell check <filename>" to review various documentation files with the default aspell dictionary. Ignored false-positives between american and british english. Signed-off-by: Jacob Stopak <jacob@initialcommit.io> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-19version: fix builtin linking & documentationVictoria Dye
Like most builtins, 'version' is documented in a corresponding 'Documentation/git-version.txt' and can be invoked with 'git version'. However, the 'check-docs' Makefile target showed that it was "removed but documented: git-version." This was cause by the fact that it is not built as a standalone 'git-version' executable, therefore appearing "removed" to 'check-docs'. Without a precedent for documented builtins that aren't built into an executable *or* any clear reason why a standalone 'git-version' shouldn't exist, the 'check-docs' error appears to correctly identify an issue. To correct that mismatch, add 'git-version' to the 'BUILT_INS' list in the root Makefile (indicating that the 'cmd_version()' function appears in a file that is *not* 'builtin/version.c'). Additionally, to avoid the "no link" message in 'check-docs', list 'git-version' as an "ancilliaryinterrogator" (like 'git help') in 'command-list.txt'. Signed-off-by: Victoria Dye <vdye@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-19diagnose: add to command-list.txtVictoria Dye
Add 'git diagnose' as an "ancilliaryinterrogator" (like 'git bugreport') to 'command-list.txt' in order to have it show up in 'git help -a' and avoid the "no link" warning message from the 'check-docs' Makefile target. Signed-off-by: Victoria Dye <vdye@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-19Documentation: add ReviewingGuidelinesVictoria Dye
Add a reviewing guidelines document including advice and common terminology used in Git mailing list reviews. The document is included in the 'TECH_DOCS' list in order to include it in Git's published documentation. Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de> Helped-by: Derrick Stolee <derrickstolee@github.com> Helped-by: Junio C Hamano <gitster@pobox.com> Helped-by: Josh Steadmon <steadmon@google.com> Signed-off-by: Victoria Dye <vdye@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-19A bit more of remaining topics before -rc1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-19Merge branch 'ad/t1800-cygwin'Junio C Hamano
Test fix. * ad/t1800-cygwin: t1800: correct test to handle Cygwin
2022-09-19Merge branch 'vd/scalar-to-main'Junio C Hamano
Hoist the remainder of "scalar" out of contrib/ to the main part of the codebase. * vd/scalar-to-main: Documentation/technical: include Scalar technical doc t/perf: add 'GIT_PERF_USE_SCALAR' run option t/perf: add Scalar performance tests scalar-clone: add test coverage scalar: add to 'git help -a' command list scalar: implement the `help` subcommand git help: special-case `scalar` scalar: include in standard Git build & installation scalar: fix command documentation section header
2022-09-19Merge branch 'es/chainlint'Junio C Hamano
Revamp chainlint script for our tests. * es/chainlint: chainlint: colorize problem annotations and test delimiters t: retire unused chainlint.sed t/Makefile: teach `make test` and `make prove` to run chainlint.pl test-lib: replace chainlint.sed with chainlint.pl test-lib: retire "lint harder" optimization hack t/chainlint: add more chainlint.pl self-tests chainlint.pl: allow `|| echo` to signal failure upstream of a pipe chainlint.pl: complain about loops lacking explicit failure handling chainlint.pl: don't flag broken &&-chain if failure indicated explicitly chainlint.pl: don't flag broken &&-chain if `$?` handled explicitly chainlint.pl: don't require `&` background command to end with `&&` t/Makefile: apply chainlint.pl to existing self-tests chainlint.pl: don't require `return|exit|continue` to end with `&&` chainlint.pl: validate test scripts in parallel chainlint.pl: add parser to identify test definitions chainlint.pl: add parser to validate tests chainlint.pl: add POSIX shell parser chainlint.pl: add POSIX shell lexical analyzer t: add skeleton chainlint.pl
2022-09-19Merge branch 'jk/list-objects-filter-cleanup'Junio C Hamano
A couple of bugfixes with code clean-up. * jk/list-objects-filter-cleanup: list-objects-filter: convert filter_spec to a strbuf list-objects-filter: add and use initializers list-objects-filter: handle null default filter spec list-objects-filter: don't memset after releasing filter struct
2022-09-19Merge branch 'zh/ls-files-format'Junio C Hamano
Typofix in the UI of a topic that has graduated to 'master'. * zh/ls-files-format: ls-files: fix black space in error message
2022-09-19Merge branch 'sy/mv-out-of-cone'Junio C Hamano
"git mv A B" in a sparsely populated working tree can be asked to move a path from a directory that is "in cone" to another directory that is "out of cone". Handling of such a case has been improved. * sy/mv-out-of-cone: builtin/mv.c: fix possible segfault in add_slash() mv: check overwrite for in-to-out move advice.h: add advise_on_moving_dirty_path() mv: cleanup empty WORKING_DIRECTORY mv: from in-cone to out-of-cone mv: remove BOTH from enum update_mode mv: check if <destination> is a SKIP_WORKTREE_DIR mv: free the with_slash in check_dir_in_index() mv: rename check_dir_in_index() to empty_dir_has_sparse_contents() t7002: add tests for moving from in-cone to out-of-cone
2022-09-19commit-graph: Fix missing closedir in expire_commit_graphsMiaoqian Lin
The function calls opendir() but missing the corresponding closedir() before exit the function. Add missing closedir() to fix it. Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Reviewed-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-19diagnose.c: refactor to safely use 'd_type'Victoria Dye
Refactor usage of the 'd_type' property of 'struct dirent' in 'diagnose.c' to instead utilize the compatibility macro 'DTYPE()'. On systems where 'd_type' is not present in 'struct dirent', this macro will always return 'DT_UNKNOWN'. In that case, instead fall back on using the 'stat.st_mode' to determine whether the dirent points to a dir, file, or link. Additionally, add a test to 't0092-diagnose.sh' to verify that files (e.g., loose objects) are counted properly. Note that the new function 'get_dtype()' is based on 'resolve_dtype()' in 'dir.c' (which itself was refactored from a prior 'get_dtype()' in ad6f2157f9 (dir: restructure in a way to avoid passing around a struct dirent, 2020-01-16)), but differs in that it is meant for use on arbitrary files, such as those inside the '.git' dir. Because of this, it does not search the index for a matching entry to derive the 'd_type'. Reported-by: Randall S. Becker <rsbecker@nexbridge.com> Signed-off-by: Victoria Dye <vdye@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-16help: fix doubled words in explanation for developer interfacesFangyi Zhou
Signed-off-by: Fangyi Zhou <me@fangyi.io> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-16api docs: link to html version of api-trace2Todd Zullinger
In f6d25d7878 (api docs: document that BUG() emits a trace2 error event, 2021-04-13), a link to the plain text version of api-trace2 was added in `technical/api-error-handling.txt`. All of our other `link:`s point to the html versions. Do the same here. Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-16docs: fix a few recently broken linksTodd Zullinger
Some links were broken in the recent move of various technical docs c0f6dd49f1 (Merge branch 'ab/tech-docs-to-help', 2022-08-14). Fix them. Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-15Git 2.38-rc0v2.38.0-rc0Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-15Merge branch 'jk/proto-v2-ref-prefix-fix'Junio C Hamano
"git fetch" over protocol v2 sent an incorrect ref prefix request to the server and made "git pull" with configured fetch refspec that does not cover the remote branch to merge with fail, which has been corrected. * jk/proto-v2-ref-prefix-fix: fetch: add branch.*.merge to default ref-prefix extension fetch: stop checking for NULL transport->remote in do_fetch()
2022-09-15Merge branch 'rs/add-p-worktree-mode-prompt-fix'Junio C Hamano
Fix another UI regression in the reimplemented "add -p". * rs/add-p-worktree-mode-prompt-fix: add -p: fix worktree patch mode prompts
2022-09-15Merge branch 'js/typofix'Junio C Hamano
Typofix. * js/typofix: Documentation: fix various repeat word typos
2022-09-15Merge branch 'en/remerge-diff-fixes'Junio C Hamano
Fix a few "git log --remerge-diff" bugs. * en/remerge-diff-fixes: diff: fix filtering of merge commits under --remerge-diff diff: fix filtering of additional headers under --remerge-diff diff: have submodule_format logic avoid additional diff headers
2022-09-15reftable: use a pointer for pq_entry paramElijah Conners
The speed of the merged_iter_pqueue_add() can be improved by using a pointer to the pq_entry struct, which is 96 bytes. Since the pq_entry param is worked directly on the stack and does not currently have a pointer to it, the merged_iter_pqueue_add() function is slightly slower. References to pq_entry in reftable have typically included pointers, such as both of the params for pq_less(). Since we are working with pointers in the pq_entry param, as keenly pointed out, the pq_entry param has also been made into a const since the contents of the pq_entry param are copied and not manipulated. Signed-off-by: Elijah Conners <business@elijahpepe.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-15t1800: correct test to handle CygwinAdam Dinwoodie
On Cygwin, when failing to spawn a process using start_command, Git outputs the same error as on Linux systems, rather than using the GIT_WINDOWS_NATIVE-specific error output. The WINDOWS test prerequisite is set in both Cygwin and native Windows environments, which means it's not appropriate to use to anticipate the error output from start_command. Instead, use the MINGW test prerequisite, which is only set for Git in native Windows environments, and not for Cygwin. Signed-off-by: Adam Dinwoodie <adam@dinwoodie.org> Helped-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-14Prepare for 2.38-rc0Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-14Merge branch 'jk/plug-list-object-filter-leaks'Junio C Hamano
The code that manages list-object-filter structure, used in partial clones, leaked the instances, which has been plugged. * jk/plug-list-object-filter-leaks: prepare_repo_settings(): plug leak of config values list_objects_filter_options: plug leak of filter_spec strings transport: free filter options in disconnect_git() transport: deep-copy object-filter struct for fetch-pack list_objects_filter_copy(): deep-copy sparse_oid_name field