summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-03-08Makefile: update 'make fuzz-all' docs to reflect modern clangLibravatar Andrzej Hunt1-3/+3
Clang no longer produces a libFuzzer.a. Instead, you can include libFuzzer by using -fsanitize=fuzzer. Therefore we should use that in the example command for building fuzzers. We also add -fsanitize=fuzzer-no-link to the CFLAGS to ensure that all the required instrumentation is added when compiling git [1], and remove -fsanitize-coverage=trace-pc-guard as it is deprecated. I happen to have tested with LLVM 11 - however -fsanitize=fuzzer appears to work in a wide range of reasonably modern clangs. (On my system: what used to be libFuzzer.a now lives under the following path, which is tricky albeit not impossible for a novice such as myself to find: /usr/lib64/clang/11.0.0/lib/linux/libclang_rt.fuzzer-x86_64.a ) [1] https://releases.llvm.org/11.0.0/docs/LibFuzzer.html#fuzzer-usage Signed-off-by: Andrzej Hunt <ajrhunt@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-03-04Merged the open-eintr workaround for macOSLibravatar Junio C Hamano1-0/+5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-03-04Documentation/RelNotes: improve release note for rename detection workLibravatar Elijah Newren1-1/+1
There were some early changes in the 2.31 cycle to optimize some setup in diffcore-rename.c[1], some later changes to measure performance[2], and finally some significant changes to improve rename detection performance. The final one was merged with the note Performance optimization work on the rename detection continues. That works for the commit log, but feels misleading as a release note since all the changes were within one cycle. Simplify this to just Performance improvements for rename detection. The former wording could be seen as hinting that more performance improvements will come in 2.32, which is true, but we can just cover those in the 2.32 release notes when the time comes. [1] a5ac31b5b1 (Merge branch 'en/diffcore-rename', 2021-01-25) [2] d3a035b055 (Merge branch 'en/merge-ort-perf', 2021-02-11) [3] 12bd17521c (Merge branch 'en/diffcore-rename', 2021-03-01) Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-03-04Merge branch 'jk/open-returns-eintr'Libravatar Junio C Hamano5-0/+42
Work around platforms whose open() is reported to return EINTR (it shouldn't, as we do our signals with SA_RESTART). * jk/open-returns-eintr: config.mak.uname: enable OPEN_RETURNS_EINTR for macOS Big Sur Makefile: add OPEN_RETURNS_EINTR knob
2021-03-04Merge https://github.com/prati0100/git-guiLibravatar Junio C Hamano2-21/+2
* https://github.com/prati0100/git-gui: Revert "git-gui: remove lines starting with the comment character"
2021-03-04Merge branch 'py/revert-commit-comments'Libravatar Pratyush Yadav2-21/+2
This commit causes breakage on macOS, or in fact any platform using older versions of Tcl. Revert it. * py/revert-commit-comments: Revert "git-gui: remove lines starting with the comment character"
2021-03-04Revert "git-gui: remove lines starting with the comment character"Libravatar Pratyush Yadav2-21/+2
This reverts commit b9a43869c9f96d3577d6f568c1bda1940c8f0e31. This commit causes breakage on macOS (10.13). It causes errors on startup and completely breaks the commit functionality. There are two main problems. First, it uses `string cat` which is not supported on older Tcl versions. Second, it does a half close of the bidirectional pipe to git-stripspace which is also not supported on older Tcl versions. Reported-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
2021-03-02Git 2.31-rc1Libravatar Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-03-01Hopefully the last batch before -rc1Libravatar Junio C Hamano1-0/+31
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-03-01Merge branch 'jh/untracked-cache-fix'Libravatar Junio C Hamano1-5/+2
An under-allocation for the untracked cache data has been corrected. * jh/untracked-cache-fix: dir: fix malloc of root untracked_cache_dir
2021-03-01Merge branch 'ns/raise-write-index-buffer-size'Libravatar Junio C Hamano1-1/+1
Raise the buffer size used when writing the index file out from (obviously too small) 8kB to (clearly sufficiently large) 128kB. * ns/raise-write-index-buffer-size: read-cache: make the index write buffer size 128K
2021-03-01Merge branch 'hv/trailer-formatting'Libravatar Junio C Hamano5-103/+236
The logic to handle "trailer" related placeholders in the "--format=" mechanisms in the "log" family and "for-each-ref" family is getting unified. * hv/trailer-formatting: ref-filter: use pretty.c logic for trailers pretty.c: capture invalid trailer argument pretty.c: refactor trailer logic to `format_set_trailers_options()` t6300: use function to test trailer options
2021-03-01Merge branch 'hn/reftable-tables-doc-update'Libravatar Junio C Hamano1-16/+26
Documentation update. * hn/reftable-tables-doc-update: doc/reftable: document how to handle windows
2021-03-01Merge branch 'sv/t7001-modernize'Libravatar Junio C Hamano1-221/+199
Test script modernization. * sv/t7001-modernize: t7001: use `test` rather than `[` t7001: use here-docs instead of echo t7001: put each command on a separate line t7001: use '>' rather than 'touch' t7001: avoid using `cd` outside of subshells t7001: remove whitespace after redirect operators t7001: modernize subshell formatting t7001: remove unnecessary blank lines t7001: indent with TABs instead of spaces t7001: modernize test formatting
2021-03-01Merge branch 'jt/transfer-fsck-across-packs'Libravatar Junio C Hamano14-51/+229
The approach to "fsck" the incoming objects in "index-pack" is attractive for performance reasons (we have them already in core, inflated and ready to be inspected), but fundamentally cannot be applied fully when we receive more than one pack stream, as a tree object in one pack may refer to a blob object in another pack as ".gitmodules", when we want to inspect blobs that are used as ".gitmodules" file, for example. Teach "index-pack" to emit objects that must be inspected later and check them in the calling "fetch-pack" process. * jt/transfer-fsck-across-packs: fetch-pack: print and use dangling .gitmodules fetch-pack: with packfile URIs, use index-pack arg http-fetch: allow custom index-pack args http: allow custom index-pack args
2021-03-01Merge branch 'ds/chunked-file-api'Libravatar Junio C Hamano10-468/+655
The common code to deal with "chunked file format" that is shared by the multi-pack-index and commit-graph files have been factored out, to help codepaths for both filetypes to become more robust. * ds/chunked-file-api: commit-graph.c: display correct number of chunks when writing chunk-format: add technical docs chunk-format: restore duplicate chunk checks midx: use 64-bit multiplication for chunk sizes midx: use chunk-format read API commit-graph: use chunk-format read API chunk-format: create read chunk API midx: use chunk-format API in write_midx_internal() midx: drop chunk progress during write midx: return success/failure in chunk write methods midx: add num_large_offsets to write_midx_context midx: add pack_perm to write_midx_context midx: add entries to write_midx_context midx: use context in write_midx_pack_names() midx: rename pack_info to write_midx_context commit-graph: use chunk-format write API chunk-format: create chunk format write API commit-graph: anonymize data in chunk_write_fn
2021-03-01Merge branch 'en/diffcore-rename'Libravatar Junio C Hamano4-18/+347
Performance optimization work on the rename detection continues. * en/diffcore-rename: merge-ort: call diffcore_rename() directly gitdiffcore doc: mention new preliminary step for rename detection diffcore-rename: guide inexact rename detection based on basenames diffcore-rename: complete find_basename_matches() diffcore-rename: compute basenames of source and dest candidates t4001: add a test comparing basename similarity and content similarity diffcore-rename: filter rename_src list when possible diffcore-rename: no point trying to find a match better than exact
2021-03-01Merge branch 'jh/fsmonitor-prework'Libravatar Junio C Hamano7-26/+196
Preliminary changes to fsmonitor integration. * jh/fsmonitor-prework: fsmonitor: refactor initialization of fsmonitor_last_update token fsmonitor: allow all entries for a folder to be invalidated fsmonitor: log FSMN token when reading and writing the index fsmonitor: log invocation of FSMonitor hook to trace2 read-cache: log the number of scanned files to trace2 read-cache: log the number of lstat calls to trace2 preload-index: log the number of lstat calls to trace2 p7519: add trace logging during perf test p7519: move watchman cleanup earlier in the test p7519: fix watchman watch-list test on Windows p7519: do not rely on "xargs -d" in test
2021-03-01Merge https://github.com/prati0100/git-guiLibravatar Junio C Hamano3-3/+22
* https://github.com/prati0100/git-gui: git-gui: remove lines starting with the comment character git-gui: fix typo in russian locale
2021-03-01Merge branch 'js/commit-graph-warning'Libravatar Junio C Hamano1-11/+3
* js/commit-graph-warning: Revert "commit-graph: when incompatible with graphs, indicate why"
2021-03-01Revert "commit-graph: when incompatible with graphs, indicate why"Libravatar Junio C Hamano1-11/+3
This reverts commit c85eec7fc37e1ca79072f263ae6ea1ee305ba38c, as it is a bit overzealous, we are in prerelease freeze, and we want to have enough time to get this right and cook in 'next'. cf. <8735xgkvuo.fsf@evledraar.gmail.com>
2021-03-01config.mak.uname: enable OPEN_RETURNS_EINTR for macOS Big SurLibravatar Jeff King1-0/+3
We've had mixed reports on whether the latest release of macOS needs this Makefile knob set. In most reported cases, there's antivirus software running (which one might imagine could cause an open() call to be delayed). However, one of the (off-list) reports I've gotten indicated that it happened on an otherwise clean install of Big Sur. Since the symptom is so bad (checkout randomly fails to write several fails when the progress meter kicks in), and since the workaround is so lightweight (if we don't see EINTR, it's just an extra conditional check), let's just turn it on by default. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-02-26Makefile: add OPEN_RETURNS_EINTR knobLibravatar Jeff King4-0/+39
On some platforms, open() reportedly returns EINTR when opening regular files and we receive a signal (usually SIGALRM from our progress meter). This shouldn't happen, as open() should be a restartable syscall, and we specify SA_RESTART when setting up the alarm handler. So it may actually be a kernel or libc bug for this to happen. But it has been reported on at least one version of Linux (on a network filesystem): https://lore.kernel.org/git/c8061cce-71e4-17bd-a56a-a5fed93804da@neanderfunk.de/ as well as on macOS starting with Big Sur even on a regular filesystem. We can work around it by retrying open() calls that get EINTR, just as we do for read(), etc. Since we don't ever _want_ to interrupt an open() call, we can get away with just redefining open, rather than insisting all callsites use xopen(). We actually do have an xopen() wrapper already (and it even does this retry, though there's no indication of it being an observed problem back then; it seems simply to have been lifted from xread(), etc). But it is used hardly anywhere, and isn't suitable for general use because it will die() on error. In theory we could combine the two, but it's awkward to do so because of the variable-args interface of open(). This patch adds a Makefile knob for enabling the workaround. It's not enabled by default for any platforms in config.mak.uname yet, as we don't have enough data to decide how common this is (I have not been able to reproduce on either Linux or Big Sur myself). It may be worth enabling preemptively anyway, since the cost is pretty low (if we don't see an EINTR, it's just an extra conditional). However, note that we must not enable this on Windows. It doesn't do anything there, and the macro overrides the existing mingw_open() redirection. I've added a preemptive #undef here in the mingw header (which is processed first) to just quietly disable it (we could also make it an #error, but there is little point in being so aggressive). Reported-by: Aleksey Kliger <alklig@microsoft.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-02-25Git 2.31-rc0Libravatar Junio C Hamano2-1/+50
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-02-25Merge branch 'jc/push-delete-nothing'Libravatar Junio C Hamano2-1/+6
"git push $there --delete ''" should have been diagnosed as an error, but instead turned into a matching push, which has been corrected. * jc/push-delete-nothing: push: do not turn --delete '' into a matching push
2021-02-25Merge branch 'sh/mergetools-vimdiff1'Libravatar Junio C Hamano1-1/+12
Mergetools update. * sh/mergetools-vimdiff1: mergetools/vimdiff: add vimdiff1 merge tool variant
2021-02-25Merge branch 'dl/doc-config-camelcase'Libravatar Junio C Hamano5-7/+7
A handful of multi-word configuration variable names in documentation that are spelled in all lowercase have been corrected to use the more canonical camelCase. * dl/doc-config-camelcase: index-format doc: camelCase core.excludesFile blame-options.txt: camelcase blame.blankBoundary i18n.txt: camel case and monospace "i18n.commitEncoding"
2021-02-25Merge branch 'js/params-vs-args'Libravatar Junio C Hamano6-18/+18
Messages update. * js/params-vs-args: replace "parameters" by "arguments" in error messages
2021-02-25Merge branch 'ug/doc-commit-approxidate'Libravatar Junio C Hamano1-4/+7
Doc update. * ug/doc-commit-approxidate: doc: mention approxidates for git-commit --date
2021-02-25Merge branch 'es/maintenance-of-bare-repositories'Libravatar Junio C Hamano2-17/+46
The "git maintenance register" command had trouble registering bare repositories, which had been corrected. * es/maintenance-of-bare-repositories: maintenance: fix incorrect `maintenance.repo` path with bare repository
2021-02-25Merge branch 'mt/add-chmod-fixes'Libravatar Junio C Hamano2-10/+54
Various fixes on "git add --chmod". * mt/add-chmod-fixes: add: propagate --chmod errors to exit status add: mark --chmod error string for translation add --chmod: don't update index when --dry-run is used
2021-02-25Merge branch 'ds/merge-base-independent'Libravatar Junio C Hamano1-25/+165
The code to implement "git merge-base --independent" was poorly done and was kept from the very beginning of the feature. * ds/merge-base-independent: commit-reach: stale commits may prune generation further commit-reach: use heuristic in remove_redundant() commit-reach: move compare_commits_by_gen commit-reach: use one walk in remove_redundant() commit-reach: reduce requirements for remove_redundant()
2021-02-25Merge branch 'ah/rebase-no-fork-point-config'Libravatar Junio C Hamano3-17/+61
"git rebase --[no-]fork-point" gained a configuration variable rebase.forkPoint so that users do not have to keep specifying a non-default setting. * ah/rebase-no-fork-point-config: rebase: add a config option for --no-fork-point
2021-02-25Merge branch 'mt/grep-sparse-checkout'Libravatar Junio C Hamano3-11/+179
"git grep" has been tweaked to be limited to the sparse checkout paths. * mt/grep-sparse-checkout: grep: honor sparse-checkout on working tree searches
2021-02-25Merge branch 'ah/commit-graph-leakplug'Libravatar Junio C Hamano1-0/+1
Plug a minor memory leak. * ah/commit-graph-leakplug: commit-graph: avoid leaking topo_levels slab in write_commit_graph()
2021-02-25Merge branch 'zh/difftool-skip-to'Libravatar Junio C Hamano2-0/+40
"git difftool" learned "--skip-to=<path>" option to restart an interrupted session from an arbitrary path. * zh/difftool-skip-to: difftool.c: learn a new way start at specified file
2021-02-25Merge branch 'cw/pack-config-doc'Libravatar Junio C Hamano2-1/+19
Doc update. * cw/pack-config-doc: doc: mention bigFileThreshold for packing
2021-02-25Merge branch 'jc/maint-column-doc-typofix'Libravatar Junio C Hamano3-3/+3
Doc update. * jc/maint-column-doc-typofix: Documentation: typofix --column description
2021-02-25Merge branch 'ma/doc-markup-fix'Libravatar Junio C Hamano3-8/+8
Docfix. * ma/doc-markup-fix: gitmailmap.txt: fix rendering of e-mail addresses git.txt: fix monospace rendering rev-list-options.txt: fix rendering of bonus paragraph
2021-02-25Merge branch 'jc/diffcore-rotate'Libravatar Junio C Hamano12-1/+197
"git {diff,log} --{skip,rotate}-to=<path>" allows the user to discard diff output for early paths or move them to the end of the output. * jc/diffcore-rotate: diff: --{rotate,skip}-to=<path>
2021-02-25Merge branch 'mt/checkout-index-corner-cases'Libravatar Junio C Hamano3-15/+51
The error codepath around the "--temp/--prefix" feature of "git checkout-index" has been improved. * mt/checkout-index-corner-cases: checkout-index: omit entries with no tempname from --temp output write_entry(): fix misuses of `path` in error messages
2021-02-25Merge branch 'js/doc-proto-v2-response-end'Libravatar Junio C Hamano1-2/+2
Docfix. * js/doc-proto-v2-response-end: doc: fix naming of response-end-pkt
2021-02-25Merge branch 'rs/blame-optim'Libravatar Junio C Hamano1-5/+3
Optimization in "git blame" * rs/blame-optim: blame: remove unnecessary use of get_commit_info()
2021-02-25Merge branch 'mz/doc-notes-are-not-anchors'Libravatar Junio C Hamano1-6/+8
Objects that lost references can be pruned away, even when they have notes attached to it (and these notes will become dangling, which in turn can be pruned with "git notes prune"). This has been clarified in the documentation. * mz/doc-notes-are-not-anchors: docs: clarify that refs/notes/ do not keep the attached objects alive
2021-02-25Merge branch 'ab/detox-gettext-tests'Libravatar Junio C Hamano104-478/+464
Removal of GIT_TEST_GETTEXT_POISON continues. * ab/detox-gettext-tests: tests: remove most uses of test_i18ncmp tests: remove last uses of C_LOCALE_OUTPUT tests: remove most uses of C_LOCALE_OUTPUT tests: remove last uses of GIT_TEST_GETTEXT_POISON=false
2021-02-25Merge branch 'jk/rev-list-disk-usage'Libravatar Junio C Hamano8-8/+292
"git rev-list" command learned "--disk-usage" option. * jk/rev-list-disk-usage: docs/rev-list: add some examples of --disk-usage docs/rev-list: add an examples section rev-list: add --disk-usage option for calculating disk usage t: add --no-tag option to test_commit
2021-02-24index-format doc: camelCase core.excludesFileLibravatar Junio C Hamano1-2/+2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-02-24blame-options.txt: camelcase blame.blankBoundaryLibravatar Junio C Hamano1-1/+1
All other references to blame.* configuration variables are camelCased already. Update this one to match. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-02-24i18n.txt: camel case and monospace "i18n.commitEncoding"Libravatar Denton Liu3-4/+4
In 95791be750 (doc: camelCase the i18n config variables to improve readability, 2017-07-17), the other i18n config variables were camel cased. However, this one instance was missed. Camel case and monospace "i18n.commitEncoding" so that it matches the surrounding text. Signed-off-by: Denton Liu <liu.denton@gmail.com> [jc: fixed 3 other mistakes that are exactly the same] Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-02-24read-cache: make the index write buffer size 128KLibravatar Neeraj Singh1-1/+1
Writing an index 8K at a time invokes the OS filesystem and caching code very frequently, introducing noticeable overhead while writing large indexes. When experimenting with different write buffer sizes on Windows writing the Windows OS repo index (260MB), most of the benefit came by bumping the index write buffer size to 64K. I picked 128K to ensure that we're past the knee of the curve. With this change, the time under do_write_index for an index with 3M files goes from ~1.02s to ~0.72s. Signed-off-by: Neeraj Singh <neerajsi@ntdev.microsoft.com> Acked-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>