summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-05-08coccicheck: make batch size of 0 mean "unlimited"Libravatar Jeff King1-1/+7
If you have the memory to handle it, the ideal case is to run a single spatch invocation with all of the source files. But the only way to do so now is to pick an arbitrarily large batch size. Let's make "0" do this, which is a little friendlier (and doesn't otherwise have a useful meaning). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-05-07coccicheck: optionally batch spatch invocationsLibravatar Jeff King1-7/+6
In our "make coccicheck" rule, we currently feed each source file to its own individual invocation of spatch. This has a few downsides: - it repeats any overhead spatch has for starting up and reading the patch file - any included header files may get processed from multiple invocations. This is slow (we see the same header files multiple times) and may produce a resulting patch with repeated hunks (which cannot be applied without further cleanup) Ideally we'd just invoke a single instance of spatch per rule-file and feed it all source files. But spatch can be rather memory hungry when run in this way. I measured the peak RSS going from ~90MB for a single file to ~1900MB for all files. Multiplied by multiple rule files being processed at the same time (for "make -j"), this can make things slower or even cause them to fail (e.g., this is reported to happen on our Travis builds). Instead, let's provide a tunable knob. We'll leave the default at "1", but it can be cranked up to "999" for maximum CPU/memory tradeoff, or people can find points in between that serve their particular machines. Here are a few numbers running a single rule via: SIZES='1 4 16 999' RULE=contrib/coccinelle/object_id.cocci for i in $SIZES; do make clean /usr/bin/time -o $i.out --format='%e | %U | %S | %M' \ make $RULE.patch SPATCH_BATCH_SIZE=$i done for i in $SIZES; do printf '%4d | %s\n' $i "$(cat $i.out)" done which yields: 1 | 97.73 | 93.38 | 4.33 | 100128 4 | 52.80 | 51.14 | 1.69 | 135204 16 | 35.82 | 35.09 | 0.76 | 284124 999 | 23.30 | 23.13 | 0.20 | 1903852 The implementation is done with xargs, which should be widely available; it's in POSIX, we rely on it already in the test suite. And "coccicheck" is really a developer-only tool anyway, so it's not a big deal if obscure systems can't run it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-25The seventh batchLibravatar Junio C Hamano1-0/+118
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-25Merge branch 'js/macos-gettext-build'Libravatar Junio C Hamano1-0/+2
Build with gettext breaks on recent macOS w/ Homebrew when /usr/local/bin is not on PATH, which has been corrected. * js/macos-gettext-build: macOS: make sure that gettext is found
2019-04-25Merge branch 'bs/sendemail-tighten-anything-by'Libravatar Junio C Hamano1-1/+1
The recently added feature to add addresses that are on anything-by: trailers in 'git send-email' was found to be way too eager and considered nonsense strings as if they can be legitimate beginning of *-by: trailer. This has been tightened. * bs/sendemail-tighten-anything-by: send-email: don't cc *-by lines with '-' prefix
2019-04-25Merge branch 'bc/send-email-qp-cr'Libravatar Junio C Hamano2-1/+15
"git send-email" has been taught to use quoted-printable when the payload contains carriage-return. The use of the mechanism is in line with the design originally added the codepath that chooses QP when the payload has overly long lines. * bc/send-email-qp-cr: send-email: default to quoted-printable when CR is present
2019-04-25Merge branch 'nd/submodule-foreach-quiet'Libravatar Junio C Hamano3-9/+20
"git submodule foreach <command> --quiet" did not pass the option down correctly, which has been corrected. * nd/submodule-foreach-quiet: submodule foreach: fix "<command> --quiet" not being respected
2019-04-25Merge branch 'js/iso8895-test-on-apfs'Libravatar Junio C Hamano1-0/+7
Test fix on APFS that is incapable of store paths in Latin-1. * js/iso8895-test-on-apfs: t9822: skip tests if file names cannot be ISO-8859-1 encoded
2019-04-25Merge branch 'jc/gettext-test-fix'Libravatar Junio C Hamano1-0/+1
The GETTEXT_POISON test option has been quite broken ever since it was made runtime-tunable, which has been fixed. * jc/gettext-test-fix: gettext tests: export the restored GIT_TEST_GETTEXT_POISON
2019-04-25Merge branch 'jk/fetch-reachability-error-fix'Libravatar Junio C Hamano7-25/+59
Code clean-up and a fix for "git fetch" by an explicit object name (as opposed to fetching refs by name). * jk/fetch-reachability-error-fix: fetch: do not consider peeled tags as advertised tips remote.c: make singular free_ref() public fetch: use free_refs() pkt-line: prepare buffer before handling ERR packets upload-pack: send ERR packet for non-tip objects t5530: check protocol response for "not our ref" t5516: drop ok=sigpipe from unreachable-want tests
2019-04-25Merge branch 'jk/xmalloc'Libravatar Junio C Hamano4-23/+9
The code is updated to check the result of memory allocation before it is used in more places, by using xmalloc and/or xcalloc calls. * jk/xmalloc: progress: use xmalloc/xcalloc xdiff: use xmalloc/xrealloc xdiff: use git-compat-util test-prio-queue: use xmalloc
2019-04-25Merge branch 'km/t3000-retitle'Libravatar Junio C Hamano1-1/+1
A test update. * km/t3000-retitle: t3000 (ls-files -o): widen description to reflect current tests
2019-04-25Merge branch 'js/untracked-cache-allocfix'Libravatar Junio C Hamano1-1/+1
An underallocation in the code to read the untracked cache extension has been corrected. * js/untracked-cache-allocfix: untracked cache: fix off-by-one
2019-04-25Merge branch 'js/t3301-unbreak-notes-test'Libravatar Junio C Hamano1-2/+3
Test fix. * js/t3301-unbreak-notes-test: t3301: fix false negative
2019-04-25Merge branch 'tz/doc-apostrophe-no-longer-needed'Libravatar Junio C Hamano1-1/+1
Doc formatting fix. * tz/doc-apostrophe-no-longer-needed: Documentation/git-show-branch: avoid literal {apostrophe}
2019-04-25Merge branch 'sg/blame-in-bare-start-at-head'Libravatar Junio C Hamano2-0/+21
"git blame -- path" in a non-bare repository starts blaming from the working tree, and the same command in a bare repository errors out because there is no working tree by definition. The command has been taught to instead start blaming from the commit at HEAD, which is more useful. * sg/blame-in-bare-start-at-head: blame: default to HEAD in a bare repo when no start commit is given
2019-04-25Merge branch 'tg/ls-files-debug-format-fix'Libravatar Junio C Hamano1-5/+5
Debugging code fix. * tg/ls-files-debug-format-fix: ls-files: use correct format string
2019-04-25Merge branch 'po/describe-not-necessarily-7'Libravatar Junio C Hamano1-1/+1
Docfix. * po/describe-not-necessarily-7: describe doc: remove '7-char' abbreviation reference
2019-04-25Merge branch 'po/rerere-doc-fmt'Libravatar Junio C Hamano1-1/+1
Docfix. * po/rerere-doc-fmt: rerere doc: quote `rerere.enabled`
2019-04-25Merge branch 'sg/overlong-progress-fix'Libravatar Junio C Hamano2-22/+54
Updating the display with progress message has been cleaned up to deal better with overlong messages. * sg/overlong-progress-fix: progress: break too long progress bar lines progress: clear previous progress update dynamically progress: assemble percentage and counters in a strbuf before printing progress: make display_progress() return void
2019-04-25Merge branch 'jt/batch-fetch-blobs-in-diff'Libravatar Junio C Hamano5-9/+154
While running "git diff" in a lazy clone, we can upfront know which missing blobs we will need, instead of waiting for the on-demand machinery to discover them one by one. Aim to achieve better performance by batching the request for these promised blobs. * jt/batch-fetch-blobs-in-diff: diff: batch fetching of missing blobs sha1-file: support OBJECT_INFO_FOR_PREFETCH
2019-04-25Merge branch 'ab/gc-docs'Libravatar Junio C Hamano3-101/+86
Update docs around "gc". * ab/gc-docs: gc docs: remove incorrect reference to gc.auto=0 gc docs: clarify that "gc" doesn't throw away referenced objects gc docs: note "gc --aggressive" in "fast-import" gc docs: downplay the usefulness of --aggressive gc docs: note how --aggressive impacts --window & --depth gc docs: fix formatting for "gc.writeCommitGraph" gc docs: re-flow the "gc.*" section in "config" gc docs: include the "gc.*" section from "config" in "gc" gc docs: clean grammar for "gc.bigPackThreshold" gc docs: stop noting "repack" flags gc docs: modernize the advice for manually running "gc"
2019-04-25Merge branch 'dl/submodule-set-branch'Libravatar Junio C Hamano6-13/+200
"git submodule" learns "set-branch" subcommand that allows the submodule.*.branch settings to be modified. * dl/submodule-set-branch: submodule: teach set-branch subcommand submodule--helper: teach config subcommand --unset git-submodule.txt: "--branch <branch>" option defaults to 'master'
2019-04-25Merge branch 'jk/revision-rewritten-parents-in-prio-queue'Libravatar Junio C Hamano2-22/+54
Performance fix for "rev-list --parents -- pathspec". * jk/revision-rewritten-parents-in-prio-queue: revision: use a prio_queue to hold rewritten parents
2019-04-25Merge branch 'dk/blame-keep-origin-blob'Libravatar Junio C Hamano1-1/+2
Performance fix around "git blame", especially in a linear history (which is the norm we should optimize for). * dk/blame-keep-origin-blob: blame.c: don't drop origin blobs as eagerly
2019-04-25Merge branch 'bc/hash-transition-16'Libravatar Junio C Hamano37-289/+362
Conversion from unsigned char[20] to struct object_id continues. * bc/hash-transition-16: (35 commits) gitweb: make hash size independent Git.pm: make hash size independent read-cache: read data in a hash-independent way dir: make untracked cache extension hash size independent builtin/difftool: use parse_oid_hex refspec: make hash size independent archive: convert struct archiver_args to object_id builtin/get-tar-commit-id: make hash size independent get-tar-commit-id: parse comment record hash: add a function to lookup hash algorithm by length remote-curl: make hash size independent http: replace sha1_to_hex http: compute hash of downloaded objects using the_hash_algo http: replace hard-coded constant with the_hash_algo http-walker: replace sha1_to_hex http-push: remove remaining uses of sha1_to_hex http-backend: allow 64-character hex names http-push: convert to use the_hash_algo builtin/pull: make hash-size independent builtin/am: make hash size independent ...
2019-04-25Merge branch 'en/fast-import-parsing-fix'Libravatar Junio C Hamano3-24/+66
"git fast-import" update. * en/fast-import-parsing-fix: fast-import: fix erroneous handling of get-mark with empty orphan commits fast-import: only allow cat-blob requests where it makes sense fast-import: check most prominent commands first git-fast-import.txt: fix wording about where ls command can appear t9300: demonstrate bug with get-mark and empty orphan commits
2019-04-25Merge branch 'jt/fetch-no-update-shallow-in-proto-v2'Libravatar Junio C Hamano2-10/+45
Fix for protocol v2 support in "git fetch-pack" of shallow clones. * jt/fetch-no-update-shallow-in-proto-v2: fetch-pack: respect --no-update-shallow in v2 fetch-pack: call prepare_shallow_info only if v0
2019-04-25Merge branch 'jt/fetch-pack-wanted-refs-optim'Libravatar Junio C Hamano1-9/+10
Performance fix around "git fetch" that grabs many refs. * jt/fetch-pack-wanted-refs-optim: fetch-pack: binary search when storing wanted-refs
2019-04-25Merge branch 'ab/test-lib-pass-trace2-env'Libravatar Junio C Hamano1-0/+1
Allow tracing of Git executable while running the testsuite. * ab/test-lib-pass-trace2-env: test-lib: whitelist GIT_TR2_* in the environment
2019-04-25Merge branch 'sg/index-pack-progress'Libravatar Junio C Hamano1-1/+9
A progress indicator has been added to the "index-pack" step, which often makes users wait for completion during "git clone". * sg/index-pack-progress: index-pack: show progress while checking objects
2019-04-25Merge branch 'ab/commit-graph-fixes'Libravatar Junio C Hamano5-54/+153
Code cleanup with more careful error checking before using data read from the commit-graph file. * ab/commit-graph-fixes: commit-graph: improve & i18n error messages commit-graph write: don't die if the existing graph is corrupt commit-graph verify: detect inability to read the graph commit-graph: don't pass filename to load_commit_graph_one_fd_st() commit-graph: don't early exit(1) on e.g. "git status" commit-graph: fix segfault on e.g. "git status" commit-graph tests: test a graph that's too small commit-graph tests: split up corrupt_graph_and_verify()
2019-04-25Merge branch 'ab/gc-reflog'Libravatar Junio C Hamano3-16/+65
Fix various glitches in "git gc" around reflog handling. * ab/gc-reflog: gc: handle & check gc.reflogExpire config reflog tests: assert lack of early exit with expiry="never" reflog tests: test for the "points nowhere" warning reflog tests: make use of "test_config" idiom gc: refactor a "call me once" pattern gc: convert to using the_hash_algo gc: remove redundant check for gc_auto_threshold
2019-04-25Merge branch 'nd/checkout-m'Libravatar Junio C Hamano6-24/+28
"git checkout -m <other>" was about carrying the differences between HEAD and the working-tree files forward while checking out another branch, and ignored the differences between HEAD and the index. The command has been taught to abort when the index and the HEAD are different. * nd/checkout-m: checkout: prevent losing staged changes with --merge read-tree: add --quiet unpack-trees: rename "gently" flag to "quiet" unpack-trees: keep gently check inside add_rejected_path
2019-04-25Merge branch 'js/difftool-no-index'Libravatar Junio C Hamano7-9/+29
"git difftool" can now run outside a repository. * js/difftool-no-index: difftool: allow running outside Git worktrees with --no-index parse-options: make OPT_ARGUMENT() more useful difftool: remove obsolete (and misleading) comment
2019-04-25Merge branch 'pw/cherry-pick-continue'Libravatar Junio C Hamano2-13/+64
"git cherry-pick --options A..B", after giving control back to the user to ask help resolving a conflicted step, did not honor the options it originally received, which has been corrected. * pw/cherry-pick-continue: cherry-pick --continue: remember options cherry-pick: demonstrate option amnesia sequencer: break some long lines
2019-04-25Merge branch 'nd/commit-a-with-paths-msg-update'Libravatar Junio C Hamano1-1/+2
The message given when "git commit -a <paths>" errors out has been updated. * nd/commit-a-with-paths-msg-update: commit: improve error message in "-a <paths>" case
2019-04-25Merge branch 'jk/server-info-rabbit-hole'Libravatar Junio C Hamano11-111/+173
Code clean-up around a much-less-important-than-it-used-to-be update_server_info() funtion. * jk/server-info-rabbit-hole: update_info_refs(): drop unused force parameter server-info: drop objdirlen pointer arithmetic server-info: drop nr_alloc struct member server-info: use strbuf to read old info/packs file server-info: simplify cleanup in parse_pack_def() server-info: fix blind pointer arithmetic http: simplify parsing of remote objects/info/packs packfile: fix pack basename computation midx: check both pack and index names for containment t5319: drop useless --buffer from cat-file t5319: fix bogus cat-file argument pack-revindex: open index if necessary packfile.h: drop extern from function declarations
2019-04-25Merge branch 'nd/diff-parseopt-4'Libravatar Junio C Hamano9-239/+219
Fourth batch to teach the diff machinery to use the parse-options API. * nd/diff-parseopt-4: am: avoid diff_opt_parse() diff --no-index: use parse_options() instead of diff_opt_parse() range-diff: use parse_options() instead of diff_opt_parse() diff.c: allow --no-color-moved-ws diff-parseopt: convert --color-moved-ws diff-parseopt: convert --[no-]color-moved diff-parseopt: convert --inter-hunk-context diff-parseopt: convert --no-prefix diff-parseopt: convert --line-prefix diff-parseopt: convert --[src|dst]-prefix diff-parseopt: convert --[no-]abbrev diff-parseopt: convert --diff-filter diff-parseopt: convert --find-object diff-parseopt: convert -O diff-parseopt: convert --pickaxe-all|--pickaxe-regex diff-parseopt: convert -S|-G diff-parseopt: convert -l diff-parseopt: convert -z diff-parseopt: convert --ita-[in]visible-in-index diff-parseopt: convert --ws-error-highlight
2019-04-25Merge branch 'jk/unused-params-even-more'Libravatar Junio C Hamano24-67/+61
Code cleanup. * jk/unused-params-even-more: parse_opt_ref_sorting: always use with NONEG flag pretty: drop unused strbuf from parse_padding_placeholder() pretty: drop unused "type" parameter in needs_rfc2047_encoding() parse-options: drop unused ctx parameter from show_gitcomp() fetch_pack(): drop unused parameters report_path_error(): drop unused prefix parameter unpack-trees: drop unused error_type parameters unpack-trees: drop name_entry from traverse_by_cache_tree() test-date: drop unused "now" parameter from parse_dates() update-index: drop unused prefix_length parameter from do_reupdate() log: drop unused "len" from show_tagger() log: drop unused rev_info from early output revision: drop some unused "revs" parameters
2019-04-25Merge branch 'sg/test-atexit'Libravatar Junio C Hamano68-247/+136
Test framework update to more robustly clean up leftover files and processes after tests are done. * sg/test-atexit: t9811-git-p4-label-import: fix pipeline negation git p4 test: disable '-x' tracing in the p4d watchdog loop git p4 test: simplify timeout handling git p4 test: clean up the p4d cleanup functions git p4 test: use 'test_atexit' to kill p4d and the watchdog process t0301-credential-cache: use 'test_atexit' to stop the credentials helper tests: use 'test_atexit' to stop httpd git-daemon: use 'test_atexit` to stop 'git-daemon' test-lib: introduce 'test_atexit' t/lib-git-daemon: make sure to kill the 'git-daemon' process test-lib: fix interrupt handling with 'dash' and '--verbose-log -x'
2019-04-25Merge branch 'ag/sequencer-reduce-rewriting-todo'Libravatar Junio C Hamano5-482/+553
The scripted version of "git rebase -i" wrote and rewrote the todo list many times during a single step of its operation, and the recent C-rewrite made a faithful conversion of the logic to C. The implementation has been updated to carry necessary information around in-core to avoid rewriting the same file over and over unnecessarily. * ag/sequencer-reduce-rewriting-todo: rebase--interactive: move transform_todo_file() sequencer: use edit_todo_list() in complete_action() rebase-interactive: rewrite edit_todo_list() to handle the initial edit rebase-interactive: append_todo_help() changes rebase-interactive: use todo_list_write_to_file() in edit_todo_list() sequencer: refactor skip_unnecessary_picks() to work on a todo_list rebase--interactive: move rearrange_squash_in_todo_file() rebase--interactive: move sequencer_add_exec_commands() sequencer: change complete_action() to use the refactored functions sequencer: make sequencer_make_script() write its script to a strbuf sequencer: refactor rearrange_squash() to work on a todo_list sequencer: refactor sequencer_add_exec_commands() to work on a todo_list sequencer: refactor check_todo_list() to work on a todo_list sequencer: introduce todo_list_write_to_file() sequencer: refactor transform_todos() to work on a todo_list sequencer: remove the 'arg' field from todo_item sequencer: make the todo_list structure public sequencer: changes in parse_insn_buffer()
2019-04-25Merge branch 'bp/post-index-change-hook'Libravatar Junio C Hamano7-3/+182
A new hook "post-index-change" is called when the on-disk index file changes, which can help e.g. a virtualized working tree implementation. * bp/post-index-change-hook: read-cache: add post-index-change hook
2019-04-22The sixth batchLibravatar Junio C Hamano1-2/+24
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-22Merge branch 'da/smerge'Libravatar Junio C Hamano3-1/+15
"git mergetool" learned to offer Sublime Merge (smerge) as one of its backends. * da/smerge: contrib/completion: add smerge to the mergetool completion candidates mergetools: add support for smerge (Sublime Merge)
2019-04-22Merge branch 'dl/flex-str-cocci'Libravatar Junio C Hamano2-1/+14
Code clean-up. * dl/flex-str-cocci: cocci: FLEX_ALLOC_MEM to FLEX_ALLOC_STR midx.c: convert FLEX_ALLOC_MEM to FLEX_ALLOC_STR
2019-04-22Merge branch 'js/spell-out-options-in-tests'Libravatar Junio C Hamano12-43/+75
The tests have been updated not to rely on the abbreviated option names the parse-options API offers, to protect us from an abbreviated form of an option that used to be unique within the command getting non-unique when a new option that share the same prefix is added. * js/spell-out-options-in-tests: tests: disallow the use of abbreviated options (by default) tests (pack-objects): use the full, unabbreviated `--revs` option tests (status): spell out the `--find-renames` option in full tests (push): do not abbreviate the `--follow-tags` option t5531: avoid using an abbreviated option t7810: do not abbreviate `--no-exclude-standard` nor `--invert-match` tests (rebase): spell out the `--force-rebase` option tests (rebase): spell out the `--keep-empty` option
2019-04-22Merge branch 'nd/read-tree-reset-doc'Libravatar Junio C Hamano1-2/+3
The documentation for "git read-tree --reset -u" has been updated. * nd/read-tree-reset-doc: read-tree.txt: clarify --reset and worktree changes
2019-04-22Merge branch 'nd/interpret-trailers-docfix'Libravatar Junio C Hamano1-1/+1
Doc update. * nd/interpret-trailers-docfix: interpret-trailers.txt: start the desc line with a capital letter
2019-04-22Merge branch 'sg/asciidoctor-in-ci'Libravatar Junio C Hamano5-36/+46
Update our support to format documentation in the CI environment, either with AsciiDoc ro Asciidoctor. * sg/asciidoctor-in-ci: ci: fix AsciiDoc/Asciidoctor stderr check in the documentation build job ci: stick with Asciidoctor v1.5.8 for now ci: install Asciidoctor in 'ci/install-dependencies.sh' Documentation/technical/protocol-v2.txt: fix formatting Documentation/technical/api-config.txt: fix formatting Documentation/git-diff-tree.txt: fix formatting