summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-03-01merge-ort: exclude messages from inner merges by defaultLibravatar Elijah Newren1-2/+3
merge-recursive would only report messages from inner merges when the GIT_MERGE_VERBOSITY was set to 5. Do the same for merge-ort. Note that somewhat reverts 0d83d8240d ("merge-ort: mark conflict/warning messages from inner merges as omittable", 2022-02-02) based on two facts: * This commit basically removes the showing of messages from inner merges as well, at least by default. The only difference is that users can request to get them back by turning up the verbosity. * Messages from inner merges are specially annotated since 4a3d86e1bb ("merge-ort: make informational messages from recursive merges clearer", 2022-02-17). The ability to distinguish them from outer merge comments make them less problematic to include, and easier for humans to parse. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-02-25The eighth batchLibravatar Junio C Hamano1-0/+29
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-02-25Merge branch 'tb/coc-plc-update'Libravatar Junio C Hamano1-1/+1
Document Taylor as a new member of Git PLC at SFC. Welcome. * tb/coc-plc-update: CODE_OF_CONDUCT.md: update PLC members list
2022-02-25Merge branch 'en/ort-inner-merge-conflict-report'Libravatar Junio C Hamano1-0/+5
Messages "ort" merge backend prepares while dealing with conflicted paths were unnecessarily confusing since it did not differentiate inner merges and outer merges. * en/ort-inner-merge-conflict-report: merge-ort: make informational messages from recursive merges clearer
2022-02-25Merge branch 'rs/pcre-invalid-utf8-fix-fix'Libravatar Junio C Hamano1-1/+1
Workaround we have for versions of PCRE2 before their version 10.36 were in effect only for their versions newer than 10.36 by mistake, which has been corrected. * rs/pcre-invalid-utf8-fix-fix: grep: fix triggering PCRE2_NO_START_OPTIMIZE workaround
2022-02-25Merge branch 'ds/core-untracked-cache-config'Libravatar Junio C Hamano1-1/+3
Setting core.untrackedCache to true failed to add the untracked cache extension to the index. * ds/core-untracked-cache-config: dir: force untracked cache with core.untrackedCache
2022-02-25Merge branch 'ab/diff-free-more'Libravatar Junio C Hamano5-9/+5
Leakfixes. * ab/diff-free-more: diff.[ch]: have diff_free() free options->parseopts diff.[ch]: have diff_free() call clear_pathspec(opts.pathspec)
2022-02-25Merge branch 'ab/date-mode-release'Libravatar Junio C Hamano20-54/+112
Plug (some) memory leaks around parse_date_format(). * ab/date-mode-release: date API: add and use a date_mode_release() date API: add basic API docs date API: provide and use a DATE_MODE_INIT date API: create a date.h, split from cache.h cache.h: remove always unused show_date_human() declaration
2022-02-25Merge branch 'jc/name-rev-stdin'Libravatar Junio C Hamano1-1/+1
Finishing touches to an earlier "name-rev --annotate-stdin" series. * jc/name-rev-stdin: name-rev: replace --stdin with --annotate-stdin in synopsis
2022-02-25Merge branch 'ab/grep-patterntype'Libravatar Junio C Hamano9-206/+195
Some code clean-up in the "git grep" machinery. * ab/grep-patterntype: grep: simplify config parsing and option parsing grep.c: do "if (bool && memchr())" not "if (memchr() && bool)" grep.h: make "grep_opt.pattern_type_option" use its enum grep API: call grep_config() after grep_init() grep.c: don't pass along NULL callback value built-ins: trust the "prefix" from run_builtin() grep tests: add missing "grep.patternType" config tests grep tests: create a helper function for "BRE" or "ERE" log tests: check if grep_config() is called by "log"-like cmds grep.h: remove unused "regex_t regexp" from grep_opt
2022-02-25Merge branch 'js/apply-partial-clone-filters-recursively'Libravatar Junio C Hamano8-8/+175
"git clone --filter=... --recurse-submodules" only makes the top-level a partial clone, while submodules are fully cloned. This behaviour is changed to pass the same filter down to the submodules. * js/apply-partial-clone-filters-recursively: clone, submodule: pass partial clone filters to submodules
2022-02-25Merge branch 'ja/i18n-common-messages'Libravatar Junio C Hamano42-85/+137
Unify more messages to help l10n. * ja/i18n-common-messages: i18n: fix some misformated placeholders in command synopsis i18n: remove from i18n strings that do not hold translatable parts i18n: factorize "invalid value" messages i18n: factorize more 'incompatible options' messages
2022-02-25Merge branch 'ab/only-single-progress-at-once'Libravatar Junio C Hamano6-76/+170
Further tweaks on progress API. * ab/only-single-progress-at-once: pack-bitmap-write.c: don't return without stop_progress() progress API: unify stop_progress{,_msg}(), fix trace2 bug progress.c: refactor stop_progress{,_msg}() to use helpers progress.c: use dereferenced "progress" variable, not "(*p_progress)" progress.h: format and be consistent with progress.c naming progress.c tests: test some invalid usage progress.c tests: make start/stop commands on stdin progress.c test helper: add missing braces leak tests: fix a memory leak in "test-progress" helper
2022-02-25Merge branch 'ds/sparse-checkout-requires-per-worktree-config'Libravatar Junio C Hamano13-49/+353
"git sparse-checkout" wants to work with per-worktree configuration, but did not work well in a worktree attached to a bare repository. * ds/sparse-checkout-requires-per-worktree-config: config: make git_configset_get_string_tmp() private worktree: copy sparse-checkout patterns and config on add sparse-checkout: set worktree-config correctly config: add repo_config_set_worktree_gently() worktree: create init_worktree_config() Documentation: add extensions.worktreeConfig details
2022-02-25Merge branch 'ab/ambiguous-object-name'Libravatar Junio C Hamano2-12/+190
Error output given in response to an ambiguous object name has been improved. * ab/ambiguous-object-name: object-name: re-use "struct strbuf" in show_ambiguous_object() object-name: iterate ambiguous objects before showing header object-name: show date for ambiguous tag objects object-name: make ambiguous object output translatable object-name: explicitly handle bad tags in show_ambiguous_object() object-name: explicitly handle OBJ_BAD in show_ambiguous_object() object-name tests: add tests for ambiguous object blind spots
2022-02-23The seventh batchLibravatar Junio C Hamano1-0/+12
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-02-23Merge branch 'bc/clarify-eol-attr'Libravatar Junio C Hamano1-5/+6
Documentation update * bc/clarify-eol-attr: doc: clarify interaction between 'eol' and text=auto
2022-02-23Merge branch 'ds/mailmap'Libravatar Junio C Hamano1-2/+3
Update mailmap entries. * ds/mailmap: mailmap: change primary address for Derrick Stolee
2022-02-23Merge branch 'ah/log-no-graph'Libravatar Junio C Hamano7-4/+105
"git log --graph --graph" used to leak a graph structure, and there was no way to countermand "--graph" that appear earlier on the command line. A "--no-graph" option has been added and resource leakage has been plugged. * ah/log-no-graph: log: add a --no-graph option log: fix memory leak if --graph is passed multiple times
2022-02-23Merge branch 'hw/t1410-adjust-test-for-reftable'Libravatar Junio C Hamano1-2/+3
Fix tests that are unnecessarily specific to ref-files backend. * hw/t1410-adjust-test-for-reftable: t1410: mark bufsize boundary test as REFFILES t1410: use test-tool ref-store to inspect reflogs
2022-02-23Merge branch 'ps/fetch-optim-with-commit-graph'Libravatar Junio C Hamano2-14/+22
A couple of optimization to "git fetch". * ps/fetch-optim-with-commit-graph: fetch: skip computing output width when not printing anything fetch-pack: use commit-graph when computing cutoff
2022-02-23Merge branch 'sy/t0001-use-path-is-helper'Libravatar Junio C Hamano1-1/+2
Test modernization. * sy/t0001-use-path-is-helper: t0001: replace "test [-d|-f]" with test_path_is_* functions
2022-02-23Merge branch 'bs/forbid-i18n-of-protocol-token-in-fetch-pack'Libravatar Junio C Hamano1-2/+10
L10n support for a few error messages. * bs/forbid-i18n-of-protocol-token-in-fetch-pack: fetch-pack: parameterize message containing 'ready' keyword
2022-02-18The sixth batchLibravatar Junio C Hamano1-0/+34
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-02-18Merge branch 'jc/glossary-worktree'Libravatar Junio C Hamano1-2/+11
"working tree" and "per-worktree ref" were in glossary, but "worktree" itself wasn't, which has been corrected. * jc/glossary-worktree: glossary: describe "worktree"
2022-02-18Merge branch 'jd/t0015-modernize'Libravatar Junio C Hamano1-3/+3
Test modernization. * jd/t0015-modernize: t/t0015-hash.sh: remove unnecessary '\' at line end
2022-02-18Merge branch 'js/short-help-outside-repo-fix'Libravatar Junio C Hamano5-11/+23
"git cmd -h" outside a repository should error out cleanly for many commands, but instead it hit a BUG(), which has been corrected. * js/short-help-outside-repo-fix: t0012: verify that built-ins handle `-h` even without gitdir checkout/fetch/pull/pack-objects: allow `-h` outside a repository
2022-02-18Merge branch 'tb/midx-no-bitmap-for-no-objects'Libravatar Junio C Hamano2-0/+31
When there is no object to write .bitmap file for, "git multi-pack-index" triggered an error, instead of just skipping, which has been corrected. * tb/midx-no-bitmap-for-no-objects: midx: prevent writing a .bitmap without any objects
2022-02-18Merge branch 'ab/release-transport-ls-refs-options'Libravatar Junio C Hamano7-15/+26
* ab/release-transport-ls-refs-options: ls-remote & transport API: release "struct transport_ls_refs_options"
2022-02-18Merge branch 'ab/hash-object-leakfix'Libravatar Junio C Hamano2-2/+8
Trivial leakfix. * ab/hash-object-leakfix: hash-object: fix a trivial leak in --path
2022-02-18Merge branch 'gc/branch-recurse-submodules'Libravatar Junio C Hamano16-81/+846
"git branch" learned the "--recurse-submodules" option. * gc/branch-recurse-submodules: branch.c: use 'goto cleanup' in setup_tracking() to fix memory leaks branch: add --recurse-submodules option for branch creation builtin/branch: consolidate action-picking logic in cmd_branch() branch: add a dry_run parameter to create_branch() branch: make create_branch() always create a branch branch: move --set-upstream-to behavior to dwim_and_setup_tracking()
2022-02-18Merge branch 'ab/t0051-skip-on-non-windows'Libravatar Junio C Hamano1-1/+6
Conditional test update. * ab/t0051-skip-on-non-windows: t0051: use "skip_all" under !MINGW in single-test file
2022-02-18Merge branch 'ps/avoid-unnecessary-hook-invocation-with-packed-refs'Libravatar Junio C Hamano8-19/+114
Because a deletion of ref would need to remove it from both the loose ref store and the packed ref store, a delete-ref operation that logically removes one ref may end up invoking ref-transaction hook twice, which has been corrected. * ps/avoid-unnecessary-hook-invocation-with-packed-refs: refs: skip hooks when deleting uncovered packed refs refs: do not execute reference-transaction hook on packing refs refs: demonstrate excessive execution of the reference-transaction hook refs: allow skipping the reference-transaction hook refs: allow passing flags when beginning transactions refs: extract packed_refs_delete_refs() to allow control of transaction
2022-02-18Merge branch 'pw/use-in-process-checkout-in-rebase'Libravatar Junio C Hamano9-163/+312
Use an internal call to reset_head() helper function instead of spawning "git checkout" in "rebase", and update code paths that are involved in the change. * pw/use-in-process-checkout-in-rebase: rebase -m: don't fork git checkout rebase --apply: set ORIG_HEAD correctly rebase --apply: fix reflog reset_head(): take struct rebase_head_opts rebase: cleanup reset_head() calls create_autostash(): remove unneeded parameter reset_head(): make default_reflog_action optional reset_head(): factor out ref updates reset_head(): remove action parameter rebase --apply: don't run post-checkout hook if there is an error rebase: do not remove untracked files on checkout rebase: pass correct arguments to post-checkout hook t5403: refactor rebase post-checkout hook tests rebase: factor out checkout for up to date branch
2022-02-18Merge branch 'cb/clear-quarantine-early-on-all-ref-update-errors'Libravatar Junio C Hamano2-0/+17
"receive-pack" checks if it will do any ref updates (various conditions could reject a push) before received objects are taken out of the temporary directory used for quarantine purposes, so that a push that is known-to-fail will not leave crufts that a future "gc" needs to clean up. * cb/clear-quarantine-early-on-all-ref-update-errors: receive-pack: purge temporary data if no command is ready to run
2022-02-18CODE_OF_CONDUCT.md: update PLC members listLibravatar Taylor Blau1-1/+1
As part of our code of conduct, we maintain a list of active members on the Project Leadership Committee, which serves a couple of purposes. The details are in 3f9ef874a7 (CODE_OF_CONDUCT: mention individual project-leader emails, 2019-09-26), but the gist is as follows: - It makes it clear that people with a CoC complaint may contact members individually as opposed to the general PLC list (in case the subject of their complaint has to do with one of the committee members). - It also serves as the de-facto list of people on the PLC, which isn't committed anywhere else in the tree. As of [1], Peff is no longer a member of Git's Project Leadership Committee. Let's update the list of active members accordingly [2]. This also gives us a convenient opportunity to thank Peff for his many years of service on the PLC, during which he helped the Git community in more ways than we can easily list here. [1]: https://lore.kernel.org/git/YboaAe4LWySOoAe7@coredump.intra.peff.net/ [2]: https://lore.kernel.org/git/CAP8UFD2XxP9r3PJ4GQjxUbV=E1ASDq1NDgB-h+S=v-bZQ7DYwQ@mail.gmail.com/ Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-02-17The fifth batchLibravatar Junio C Hamano1-0/+24
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-02-17Merge branch 'ab/complete-show-all-commands'Libravatar Junio C Hamano2-22/+72
The command line completion script (in contrib/) learned to complete all Git subcommands, including the ones that are normally hidden, when GIT_COMPLETION_SHOW_ALL_COMMANDS is used. * ab/complete-show-all-commands: completion: add a GIT_COMPLETION_SHOW_ALL_COMMANDS completion tests: re-source git-completion.bash in a subshell
2022-02-17Merge branch 'sy/modernize-t-lib-read-tree-m-3way'Libravatar Junio C Hamano1-84/+84
Style updates on a test script helper. * sy/modernize-t-lib-read-tree-m-3way: t/lib-read-tree-m-3way: indent with tabs t/lib-read-tree-m-3way: modernize style
2022-02-17Merge branch 'po/doc-check-ignore-markup-fix'Libravatar Junio C Hamano1-2/+2
Typofix. * po/doc-check-ignore-markup-fix: doc: check-ignore: code-quote an exclamation mark
2022-02-17Merge branch 'js/scalar-global-options'Libravatar Junio C Hamano3-1/+39
Scalar update. * js/scalar-global-options: scalar: accept -C and -c options before the subcommand
2022-02-17Merge branch 'vd/sparse-clean-etc'Libravatar Junio C Hamano8-17/+360
"git update-index", "git checkout-index", and "git clean" are taught to work better with the sparse checkout feature. * vd/sparse-clean-etc: update-index: reduce scope of index expansion in do_reupdate update-index: integrate with sparse index update-index: add tests for sparse-checkout compatibility checkout-index: integrate with sparse index checkout-index: add --ignore-skip-worktree-bits option checkout-index: expand sparse checkout compatibility tests clean: integrate with sparse index reset: reorder wildcard pathspec conditions reset: fix validation in sparse index test
2022-02-17Merge branch 'jz/rev-list-exclude-first-parent-only'Libravatar Junio C Hamano6-26/+51
"git log" and friends learned an option --exclude-first-parent-only to propagate UNINTERESTING bit down only along the first-parent chain, just like --first-parent option shows commits that lack the UNINTERESTING bit only along the first-parent chain. * jz/rev-list-exclude-first-parent-only: git-rev-list: add --exclude-first-parent-only flag
2022-02-17Merge branch 'jz/patch-id-hunk-header-parsing-fix'Libravatar Junio C Hamano2-36/+68
Unlike "git apply", "git patch-id" did not handle patches with hunks that has only 1 line in either preimage or postimage, which has been corrected. * jz/patch-id-hunk-header-parsing-fix: patch-id: fix scan_hunk_header on diffs with 1 line of before/after patch-id: fix antipatterns in tests
2022-02-17Merge branch 'hn/reftable-tests'Libravatar Junio C Hamano2-6/+12
Prepare more test scripts for the introduction of reftable. * hn/reftable-tests: t5312: prepare for reftable t1405: mark test that checks existence as REFFILES t1405: explictly delete reflogs for reftable
2022-02-17Merge branch 'tk/subtree-merge-not-ff-only'Libravatar Junio C Hamano1-2/+2
When "git subtree" wants to create a merge, it used "git merge" and let it be affected by end-user's "merge.ff" configuration, which has been corrected. * tk/subtree-merge-not-ff-only: subtree: force merge commit
2022-02-17merge-ort: make informational messages from recursive merges clearerLibravatar Elijah Newren1-0/+5
This is another simple change with a long explanation... merge-recursive and merge-ort are both based on the same recursive idea: if there is more than one merge base, merge the merge bases (which may require first merging the merge bases of the merges bases, etc.). The depth of the inner merge is recorded via a variable called "call_depth", which we'll bring up again later. Naturally, the inner merges themselves can have conflicts and various messages generated about those files. merge-recursive immediately prints to stdout as it goes, at the risk of printing multiple conflict notices for the same path separated far apart from each other with many intervenining conflict notices for other paths between them. And this is true even if there are no inner merges involved. An example of this was given in [1] and apparently caused some confusion: CONFLICT (rename/add): Rename A->B in HEAD. B added in otherbranch ...dozens of conflicts for OTHER paths... CONFLICT (content): Merge conflicts in B In contrast, merge-ort collects messages and stores them by path so that it can print them grouped by path. Thus, the same case handled by merge-ort would have output of the form: CONFLICT (rename/add): Rename A->B in HEAD. B added in otherbranch CONFLICT (content): Merge conflicts in B ...dozens of conflicts for OTHER paths... This is generally helpful, but does make a separate bug more problematic. In particular, while merge-recursive might report the following for a recursive merge: Auto-merging dir.c Auto-merging midx.c CONFLICT (content): Merge conflict in midx.c Auto-merging diff.c Auto-merging dir.c CONFLICT (content): Merge conflict in dir.c merge-ort would instead report: Auto-merging diff.c Auto-merging dir.c Auto-merging dir.c CONFLICT (content): Merge conflict in dir.c Auto-merging midx.c CONFLICT (content): Merge conflict in midx.c The fact that messages for the same file are together is probably helpful in general, but with the indentation missing for the inner merge it unfortunately serves to confuse. This probably would lead users to wonder: * Why is Git reporting that "dir.c" is being merged twice? * If midx.c has conflicts, why do I not see any when I open up the file and why are no conflicts shown in the index? Fix this output confusion by changing the output to clearly differentiate the messages for outer merges from the ones for inner merges, changing the above output from merge-ort to: Auto-merging diff.c From inner merge: Auto-merging dir.c Auto-merging dir.c CONFLICT (content): Merge conflict in dir.c From inner merge: Auto-merging midx.c From inner merge: CONFLICT (content): Merge conflict in midx.c (Note: the number of spaces after the 'From inner merge:' is 2*call_depth). One other thing to note here, that I didn't notice until typing up this commit message, is that merge-recursive does not print any messages from the inner merges by default; the extra verbosity has to be requested. merge-ort currently has no verbosity controls and always prints these. We may also want to change that, but for now, just make the output clearer with these extra markings and indentation. [1] https://lore.kernel.org/git/CAGyf7-He4in8JWUh9dpAwvoPkQz9hr8nCBpxOxhZEd8+jtqTpg@mail.gmail.com/ Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-02-17grep: fix triggering PCRE2_NO_START_OPTIMIZE workaroundLibravatar René Scharfe1-1/+1
PCRE2 bug 2642 was fixed in version 10.36. Our 95ca1f987e (grep/pcre2: better support invalid UTF-8 haystacks, 2021-01-24) worked around it on older versions by setting the flag PCRE2_NO_START_OPTIMIZE. 797c359978 (grep/pcre2: use compile-time PCREv2 version test, 2021-02-18) switched it around to set the flag on 10.36 and higher instead, while it claimed to use "the same test done at compile-time". Switch the condition back to apply the workaround on PCRE2 versions _before_ 10.36. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-02-17dir: force untracked cache with core.untrackedCacheLibravatar Derrick Stolee1-1/+3
The GIT_FORCE_UNTRACKED_CACHE environment variable writes the untracked cache more frequently than the core.untrackedCache config variable. This is due to how read_directory() handles the creation of an untracked cache. Before this change, Git would not create the untracked cache extension for an index that did not already have one. Users would need to run a command such as 'git update-index --untracked-cache' before the index would actually contain an untracked cache. In particular, users noticed that the untracked cache would not appear even with core.untrackedCache=true. Some users reported setting GIT_FORCE_UNTRACKED_CACHE=1 in their engineering system environment to ensure the untracked cache would be created. The decision to not write the untracked cache without an environment variable tracks back to fc9ecbeb9 (dir.c: don't flag the index as dirty for changes to the untracked cache, 2018-02-05). The motivation of that change is that writing the index is expensive, and if the untracked cache is the only thing that needs to be written, then it is more expensive than the benefit of the cache. However, this also means that the untracked cache never gets populated, so the user who enabled it via config does not actually get the extension until running 'git update-index --untracked-cache' manually or using the environment variable. We have had a version of this change in the microsoft/git fork for a few major releases now. It has been working well to get users into a good state. Yes, that first index write is slow, but the remaining index writes are much faster than they would be without this change. Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-02-16The fourth batchLibravatar Junio C Hamano1-0/+28
Signed-off-by: Junio C Hamano <gitster@pobox.com>