summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-11-01leak tests: mark some add tests as passing with SANITIZE=leakLibravatar Ævar Arnfjörð Bjarmason7-0/+8
Mark some tests that match "*add*" as passing when git is compiled with SANITIZE=leak. They'll now be listed as running under the "GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI target). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-11-01leak tests: mark some diff tests as passing with SANITIZE=leakLibravatar Ævar Arnfjörð Bjarmason25-0/+38
Mark some tests that match "*diff*" as passing when git is compiled with SANITIZE=leak. They'll now be listed as running under the "GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI target). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-11-01leak tests: mark some apply tests as passing with SANITIZE=leakLibravatar Ævar Arnfjörð Bjarmason22-0/+44
Mark some tests that match "*apply*" as passing when git is compiled with SANITIZE=leak. They'll now be listed as running under the "GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI target). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-11-01leak tests: mark some notes tests as passing with SANITIZE=leakLibravatar Ævar Arnfjörð Bjarmason3-0/+3
Mark some tests that match "*notes*" as passing when git is compiled with SANITIZE=leak. They'll now be listed as running under the "GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI target). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-11-01leak tests: mark some update-index tests as passing with SANITIZE=leakLibravatar Ævar Arnfjörð Bjarmason5-0/+5
Mark some tests that match "*update-index*" as passing when git is compiled with SANITIZE=leak. They'll now be listed as running under the "GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI target). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-11-01leak tests: mark some rev-parse tests as passing with SANITIZE=leakLibravatar Ævar Arnfjörð Bjarmason4-0/+5
Mark some tests that match "*rev-parse*" as passing when git is compiled with SANITIZE=leak. They'll now be listed as running under the "GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI target). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-11-01leak tests: mark some rev-list tests as passing with SANITIZE=leakLibravatar Ævar Arnfjörð Bjarmason2-0/+2
Mark some tests that match "*rev-list*" as passing when git is compiled with SANITIZE=leak. They'll now be listed as running under the "GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI target). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-11-01leak tests: mark some misc tests as passing with SANITIZE=leakLibravatar Ævar Arnfjörð Bjarmason17-0/+22
As in 7ff24785cb7 (leak tests: mark some misc tests as passing with SANITIZE=leak, 2021-10-12) continue marking various miscellaneous tests as passing when git is compiled with SANITIZE=leak. They'll now be listed as running under the "GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI target). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-11-01leak tests: mark most gettext tests as passing with SANITIZE=leakLibravatar Ævar Arnfjörð Bjarmason4-0/+4
Mark all but one tests that match "*gettext*" as passing when git is compiled with SANITIZE=leak. They'll now be listed as running under the "GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI target). In the case of "t0202-gettext-perl.sh" this isn't very meaningful as most of the work is on the Perl side, but let's mark it anyway. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-11-01leak tests: mark "sort" test as passing SANITIZE=leakLibravatar Ævar Arnfjörð Bjarmason1-0/+1
Mark a test that was recently added in e031e9719d2 (test-mergesort: add test subcommand, 2021-10-01) as passing with SANITIZE=leak. It will now be listed as running under the "GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI target). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-11-01leak tests: mark a read-tree test as passing SANITIZE=leakLibravatar Ævar Arnfjörð Bjarmason1-0/+2
The "t1002-read-tree-m-u-2way.sh" test has passed under SANITIZE=leak since 04988c8d182 (unpack-trees: introduce preserve_ignored to unpack_trees_options, 2021-09-27) was combined with e5a917fcf42 (unpack-trees: don't leak memory in verify_clean_subdirectory(), 2021-10-07), but as both were in-flight at the time neither could mark it as passing. It will now be listed as running under the "GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI target). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-10-31i18n: fix typos found during l10n for git 2.34.0Libravatar Jiang Xin3-3/+3
Emir and Jean-Noël reported typos in some i18n messages when preparing l10n for git 2.34.0. * Fix unstable spelling of config variable "gpg.ssh.defaultKeyCommand" which was introduced in commit fd9e226776 (ssh signing: retrieve a default key from ssh-agent, 2021-09-10). * Add missing space between "with" and "--python" which was introduced in commit bd0708c7eb (ref-filter: add %(raw) atom, 2021-07-26). * Fix unmatched single quote in 'builtin/index-pack.c' which was introduced in commit 8737dab346 (index-pack: refactor renaming in final(), 2021-09-09) [1] https://github.com/git-l10n/git-po/pull/567 Reported-by: Emir Sarı <bitigchi@me.com> Reported-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Jiang Xin <worldhello.net@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-10-29Git 2.34-rc0Libravatar Junio C Hamano2-1/+27
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-10-29Merge branch 're/completion-fix-test-equality'Libravatar Junio C Hamano1-1/+1
Fix long-standing shell syntax error in the completion script. * re/completion-fix-test-equality: completion: fix incorrect bash/zsh string equality check
2021-10-29Merge branch 'mt/fix-add-rm-with-sparse-index'Libravatar Junio C Hamano4-11/+96
Fix-up to a topic already merged to 'master'. * mt/fix-add-rm-with-sparse-index: add, rm, mv: fix bug that prevents the update of non-sparse dirs
2021-10-29Merge branch 'cm/drop-xunsetenv'Libravatar Junio C Hamano2-7/+0
Drop a helper function that has never been used since its addition. * cm/drop-xunsetenv: wrapper: remove xunsetenv()
2021-10-29Merge branch 'jk/log-warn-on-bogus-encoding'Libravatar Junio C Hamano3-14/+3
Squelch over-eager warning message added during this cycle. * jk/log-warn-on-bogus-encoding: log: document --encoding behavior on iconv() failure Revert "logmsg_reencode(): warn when iconv() fails"
2021-10-29Merge branch 'ab/unbundle-progress'Libravatar Junio C Hamano1-4/+4
Doc clarification. * ab/unbundle-progress: git-bundle.txt: add missing words and punctuation
2021-10-29Merge branch 'jc/branch-copy-doc'Libravatar Junio C Hamano1-2/+2
"git branch -c/-m new old" was not described to copy config, which has been corrected. * jc/branch-copy-doc: branch (doc): -m/-c copies config and reflog
2021-10-29Merge branch 'ma/doc-folder-to-directory'Libravatar Junio C Hamano3-5/+5
Consistently use 'directory', not 'folder', to call the filesystem entity that collects a group of files and, eh, directories. * ma/doc-folder-to-directory: gitweb.txt: change "folder" to "directory" gitignore.txt: change "folder" to "directory" git-multi-pack-index.txt: change "folder" to "directory"
2021-10-29Merge branch 'sg/sparse-index-not-that-common-a-command'Libravatar Junio C Hamano1-1/+1
Drop "git sparse-index" from the list of common commands. * sg/sparse-index-not-that-common-a-command: command-list.txt: remove 'sparse-index' from main help
2021-10-29Merge branch 'ma/doc-git-version'Libravatar Junio C Hamano1-1/+1
Typofix. * ma/doc-git-version: git.txt: fix typo
2021-10-29Merge branch 'js/expand-runtime-prefix'Libravatar Junio C Hamano1-1/+1
Typofix. * js/expand-runtime-prefix: config.txt: fix typo
2021-10-29Merge branch 'bs/archive-doc-compression-level'Libravatar Junio C Hamano1-5/+12
Update "git archive" documentation and give explicit mention on the compression level for both zip and tar.gz format. * bs/archive-doc-compression-level: archive: describe compression level option
2021-10-29Merge branch 'ks/submodule-add-message-fix'Libravatar Junio C Hamano1-14/+22
Message regression fix. * ks/submodule-add-message-fix: submodule: drop unused sm_name parameter from append_fetch_remotes() submodule--helper: fix incorrect newlines in an error message
2021-10-29Merge branch 'ab/fix-make-lint-docs'Libravatar Junio C Hamano1-2/+2
Hotfix for a topic recently merged to 'master'. * ab/fix-make-lint-docs: Documentation/Makefile: fix lint-docs mkdir dependency
2021-10-29Merge branch 'ab/sh-retire-rebase-preserve-merges'Libravatar Junio C Hamano2-23/+1
Code clean-up to remove unused helpers. * ab/sh-retire-rebase-preserve-merges: git-sh-setup: remove messaging supporting --preserve-merges git-sh-i18n: remove unused eval_ngettext()
2021-10-29Merge branch 'ab/plug-random-leaks'Libravatar Junio C Hamano5-8/+16
Leakfix. * ab/plug-random-leaks: reflog: free() ref given to us by dwim_log() submodule--helper: fix small memory leaks clone: fix a memory leak of the "git_dir" variable grep: fix a "path_list" memory leak grep: use object_array_clear() in cmd_grep() grep: prefer "struct grep_opt" over its "void *" equivalent
2021-10-29Merge branch 'ab/plug-handle-path-exclude-leak'Libravatar Junio C Hamano2-2/+6
Leakfix. * ab/plug-handle-path-exclude-leak: config.c: don't leak memory in handle_path_include()
2021-10-29Merge branch 'ab/ref-filter-leakfix'Libravatar Junio C Hamano5-16/+34
"git for-each-ref" family of commands were leaking the ref_sorting instances that hold sorting keys specified by the user; this has been corrected. * ab/ref-filter-leakfix: branch: use ref_sorting_release() ref-filter API user: add and use a ref_sorting_release() tag: use a "goto cleanup" pattern, leak less memory
2021-10-29Merge branch 'jk/http-push-status-fix'Libravatar Junio C Hamano6-0/+35
"git push" client talking to an HTTP server did not diagnose the lack of the final status report from the other side correctly, which has been corrected. * jk/http-push-status-fix: transport-helper: recognize "expecting report" error from send-pack send-pack: complain about "expecting report" with --helper-status
2021-10-29Merge branch 'ab/test-bail'Libravatar Junio C Hamano1-7/+21
A new feature has been added to abort early in the test framework. * ab/test-bail: test-lib.sh: use "Bail out!" syntax on bad SANITIZE=leak use test-lib.sh: de-duplicate error() teardown code
2021-10-29Merge branch 'ab/make-sparse-for-real'Libravatar Junio C Hamano1-1/+1
Fix-up for a recent topic. * ab/make-sparse-for-real: Makefile: remove redundant GIT-CFLAGS dependency from "sparse"
2021-10-29Merge branch 'bs/doc-blame-color-lines'Libravatar Junio C Hamano1-2/+0
Doc fix. * bs/doc-blame-color-lines: git config doc: fix recent ASCIIDOC formatting regression
2021-10-29wrapper: remove xunsetenv()Libravatar Carlo Marcelo Arenas Belón2-7/+0
Remove the unused wrapper function. Reported-by: Randall S. Becker <rsbecker@nexbridge.com> Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-10-29log: document --encoding behavior on iconv() failureLibravatar Jeff King1-1/+3
We already note that we may produce invalid output when we skip calling iconv() altogether. But we may also do so if iconv() fails, and we have no good alternative. Let's document this to avoid surprising users. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-10-29Revert "logmsg_reencode(): warn when iconv() fails"Libravatar Junio C Hamano3-15/+2
This reverts commit fd680bc5 (logmsg_reencode(): warn when iconv() fails, 2021-08-27). Throwing a warning for each and every commit that gets reencoded, without allowing a way to squelch, would make it unpleasant for folks who have to deal with an ancient part of the history in an old project that used wrong encoding in the commits.
2021-10-28completion: fix incorrect bash/zsh string equality checkLibravatar Robert Estelle1-1/+1
In the basic `[`/`test` command, the string equality operator is a single `=`. The `==` operator is only available in `[[`, which is a bash-ism also supported by zsh. This mix-up was causing the following completion error in zsh: > __git_ls_files_helper:7: = not found (That message refers to the extraneous symbol in `==` ← `=`). This updates that comparison to use a single `=` inside the basic `[ … ]` test conditional. Although this fix is inconsistent with the other comparisons in this file, which use `[[ … == … ]]`, and the two expressions are functionally identical in this context, that approach was rejected due to a preference for `[`. Signed-off-by: Robert Estelle <robertestelle@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-10-28add, rm, mv: fix bug that prevents the update of non-sparse dirsLibravatar Matheus Tavares4-11/+96
These three commands recently learned to avoid updating paths outside the sparse checkout even if they are missing the SKIP_WORKTREE bit. This is done using path_in_sparse_checkout(), which checks whether a given path matches the current list of sparsity rules, similar to what clear_ce_flags() does when we run "git sparse checkout init" or "git sparse-checkout reapply". However, clear_ce_flags() uses a recursive approach, applying the match results from parent directories on paths that get the UNDECIDED result, whereas path_in_sparse_checkout() only attempts to match the full path and immediately considers UNDECIDED as NOT_MATCHED. This makes the function miss matches with leading directories. For example, if the user has the sparsity patterns "!/a" and "b/", add, rm, and mv will fail to update the path "a/b/c" and end up displaying a warning about it being outside the sparse checkout even though it isn't. This problem only occurs in full pattern mode as the pattern matching functions never return UNDECIDED for cone mode. To fix this, replicate the recursive behavior of clear_ce_flags() in path_in_sparse_checkout(), falling back to the parent directory match when a path gets the UNDECIDED result. (If this turns out to be too expensive in some cases, we may want to later add some form of caching to accelerate multiple queries within the same directory. This is not implemented in this patch, though.) Also add two tests for each affected command (add, rm, and mv) to check that they behave correctly with the recursive pattern matching. The first test would previously fail without this patch while the second already succeeded. It is added mostly to make sure that we are not breaking the existing pattern matching for directories that are really sparse, and also as a protection against any future regressions. Two other existing tests had to be changed as well: one test in t3602 checks that "git rm -r <dir>" won't remove sparse entries, but it didn't allow the non-sparse entries inside <dir> to be removed. The other one, in t7002, tested that "git mv" would correctly display a warning message for sparse paths, but it accidentally expected the message to include two non-sparse paths as well. Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br> Acked-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-10-27git-bundle.txt: add missing words and punctuationLibravatar Martin Ågren1-4/+4
Add an "and" to separate the two halves of the first sentence of the paragraph more. Add a comma to similarly separate the two halves of the second sentence a bit better. Add a period at the end of the paragraph. Further down in the file, add the missing "be" in "must be accompanied". Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-10-27Documentation/Makefile: fix lint-docs mkdir dependencyLibravatar Jeff King1-2/+2
Since 8650c6298c (doc lint: make "lint-docs" non-.PHONY, 2021-10-15), we put the output for gitlink linter into .build/lint-docs/gitlink. There are order-only dependencies to create the sequence of subdirs like: .build/lint-docs: | .build $(QUIET)mkdir $@ .build/lint-docs/gitlink: | .build/lint-docs $(QUIET)mkdir $@ where each level has to depend on the prior one (since the parent directory must exist for us to create something inside it). But the "howto" and "config" subdirectories of gitlink have the wrong dependency; they depend on "lint-docs", not "lint-docs/gitlink". This usually works out, because the LINT_DOCS_GITLINK targets which depend on "gitlink/howto" also depend on just "gitlink", so the directory gets created anyway. But since we haven't given make an explicit ordering, things can racily happen out of order. If you stick a "sleep 1" in the rule to build "gitlink" like this: ## Lint: gitlink .build/lint-docs/gitlink: | .build/lint-docs - $(QUIET)mkdir $@ + $(QUIET)sleep 1 && mkdir $@ then "make clean; make lint-docs" will fail reliably. Or you can see it as-is just by building the directory in isolation: $ make clean [...] $ make .build/lint-docs/gitlink/howto GEN mergetools-list.made GEN cmd-list.made GEN doc.dep SUBDIR ../ make[1]: 'GIT-VERSION-FILE' is up to date. SUBDIR ../ make[1]: 'GIT-VERSION-FILE' is up to date. mkdir: cannot create directory ‘.build/lint-docs/gitlink/howto’: No such file or directory make: *** [Makefile:476: .build/lint-docs/gitlink/howto] Error 1 The fix is easy: we just need to depend on the correct parent directory. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-10-27submodule: drop unused sm_name parameter from append_fetch_remotes()Libravatar Jeff King1-3/+2
Commit c21fb4676f (submodule--helper: fix incorrect newlines in an error message, 2021-10-23) accidentally added a new, unused parameter while changing the name and signature of show_fetch_remotes() to append_fetch_remotes(). We can drop this to keep things simpler (and satisfy -Wunused-parameter). The error is likely because c21fb4676f is fixing a problem from 8c8195e9c3 (submodule--helper: introduce add-clone subcommand, 2021-07-10). An earlier iteration of that second commit introduced the same unused parameter (though it was dropped before it finally made it to 'next'), and the fix on top accidentally carried forward the extra parameter. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-10-25The fifteenth batchLibravatar Junio C Hamano1-0/+38
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-10-25Merge branch 'ab/test-lib-diff-cleanup'Libravatar Junio C Hamano14-433/+53
Test clean-up. * ab/test-lib-diff-cleanup: tests: stop using top-level "README" and "COPYING" files "lib-diff" tests: make "README" and "COPYING" test data smaller
2021-10-25Merge branch 'ab/fix-make-lint-docs'Libravatar Junio C Hamano5-13/+69
Build fix. * ab/fix-make-lint-docs: doc lint: make "lint-docs" non-.PHONY doc build: speed up "make lint-docs" doc lint: emit errors on STDERR doc lint: fix error-hiding regression
2021-10-25Merge branch 'ab/pkt-line-cleanup'Libravatar Junio C Hamano6-53/+13
Code clean-up. * ab/pkt-line-cleanup: pkt-line.[ch]: remove unused packet_read_line_buf() pkt-line.[ch]: remove unused packet_buf_write_len()
2021-10-25Merge branch 'tb/fix-midx-rename-while-mapped'Libravatar Junio C Hamano1-19/+23
The codepath to write a new version of .midx multi-pack index files has learned to release the mmaped memory holding the current version of .midx before removing them from the disk, as some platforms do not allow removal of a file that still has mapping. * tb/fix-midx-rename-while-mapped: midx.c: guard against commit_lock_file() failures midx.c: lookup MIDX by object directory during repack midx.c: lookup MIDX by object directory during expire midx.c: extract MIDX lookup by object_dir
2021-10-25Merge branch 'ab/test-cleanly-recreate-trash-directory'Libravatar Junio C Hamano1-1/+13
Improve test framework around unwritable directories. * ab/test-cleanly-recreate-trash-directory: test-lib.sh: try to re-chmod & retry on failed trash removal
2021-10-25Merge branch 'jc/doc-commit-header-continuation-line'Libravatar Junio C Hamano1-4/+20
Doc update. * jc/doc-commit-header-continuation-line: signature-format.txt: explain and illustrate multi-line headers
2021-10-25Merge branch 'ab/mark-leak-free-tests-more'Libravatar Junio C Hamano16-11/+38
Bunch of tests are marked as "passing leak check". * ab/mark-leak-free-tests-more: merge: add missing strbuf_release() ls-files: add missing string_list_clear() ls-files: fix a trivial dir_clear() leak tests: fix test-oid-array leak, test in SANITIZE=leak tests: fix a memory leak in test-oidtree.c tests: fix a memory leak in test-parse-options.c tests: fix a memory leak in test-prio-queue.c