summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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-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-24add: propagate --chmod errors to exit statusLibravatar Matheus Tavares2-10/+28
If `add` encounters an error while applying the --chmod changes, it prints a message to stderr, but exits with a success code. This might have been an oversight, as the command does exit with a non-zero code in other situations where it cannot (or refuses to) update all of the requested paths (e.g. when some of the given paths are ignored). So make the exit behavior more consistent by also propagating --chmod errors to the exit status. Note: the test "all statuses changed in folder if . is given" uses paths added by previous test cases, some of which might be symbolic links. Because `git add --chmod` will now fail with such paths, this test would depend on whether all the previous tests were executed, or only some of them. Avoid that by running the test on a fresh repo with only regular files. Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br> Reviewed-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-02-24add: mark --chmod error string for translationLibravatar Matheus Tavares2-2/+2
This error message is intended for humans, so mark it for translation. Also use error() instead of fprintf(stderr, ...), to make the corresponding line a bit cleaner, and to display the "error:" prefix, which helps classifying the nature/severity of the message. Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br> Reviewed-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-02-24add --chmod: don't update index when --dry-run is usedLibravatar Matheus Tavares2-3/+29
`git add --chmod` applies the mode changes even when `--dry-run` is used. Fix that and add some tests for this option combination. Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br> Reviewed-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-02-24rebase: add a config option for --no-fork-pointLibravatar Alex Henrie3-17/+61
Some users (myself included) would prefer to have this feature off by default because it can silently drop commits. Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-02-24commit-graph.c: display correct number of chunks when writingLibravatar Taylor Blau1-4/+3
When writing a commit-graph, a progress meter is shown which indicates the number of pieces of data to write (one per commit in each chunk). In 47410aa837 (commit-graph: use chunk-format write API, 2021-02-18), the number of chunks became tracked by the new chunk-format API. But a stray local variable was left behind from when write_commit_graph_file() used to keep track of the same. Since this was no longer updated after 47410aa837, the progress meter appeared broken: $ git commit-graph write --reachable Expanding reachable commits in commit graph: 837569, done. Writing out commit graph in 3 passes: 166% (4187845/2512707), done. Drop the local variable and rely instead on the chunk-format API to tell us the correct number of chunks. Reported-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Taylor Blau <me@ttaylorr.com> Acked-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-02-23push: do not turn --delete '' into a matching pushLibravatar Junio C Hamano2-1/+6
When we added a syntax sugar "git push remote --delete <ref>" to "git push" as a synonym to the canonical "git push remote :<ref>" syntax at f517f1f2 (builtin-push: add --delete as syntactic sugar for :foo, 2009-12-30), we weren't careful enough to make sure that <ref> is not empty. Blindly rewriting "--delete <ref>" to ":<ref>" means that an empty string <ref> results in refspec ":", which is the syntax to ask for "matching" push that does not delete anything. Worse yet, if there were matching refs that can be fast-forwarded, they would have been published prematurely, even if the user feels that they are not ready yet to be pushed out, which would be a real disaster. Noticed-by: Tilman Vogel <tilman.vogel@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-02-23doc: mention approxidates for git-commit --dateLibravatar Jeff King1-4/+7
We describe the more strict date formats accepted by GIT_COMMITTER_DATE, etc, but the --date option also allows the looser approxidate formats, as well. Unfortunately we don't have a good or complete reference for this format, but let's at least mention that it _is_ looser, and give a few examples. If we ever write separate, more complete date-format documentation, we should refer to it from here. Based-on-a-patch-by: Utku Gultopu <ugultopu@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-02-23replace "parameters" by "arguments" in error messagesLibravatar Johannes Sixt6-18/+18
When an error message informs the user about an incorrect command invocation, it should refer to "arguments", not "parameters". Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-02-23mergetools/vimdiff: add vimdiff1 merge tool variantLibravatar Seth House1-1/+12
This adds yet another vimdiff/gvimdiff variant and presents conflicts as a two-way diff between 'LOCAL' and 'REMOTE'. 'MERGED' is not opened which deviates from the norm so usage text is echoed as a Vim message on startup that instructs the user with how to proceed and how to abort. Vimdiff is well-suited to two-way diffs so this is an option for a more simple, more streamlined conflict resolution. For example: it is difficult to communicate differences across more than two files using only syntax highlighting; default vimdiff commands to get and put changes between buffers do not need the user to manually specify a source or destination buffer when only using two buffers. Like other merge tools that directly compare 'LOCAL' with 'REMOTE', this tool will benefit when paired with the new `mergetool.hideResolved` setting. Signed-off-by: Seth House <seth@eseth.com> Tested-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-02-23doc/reftable: document how to handle windowsLibravatar Han-Wen Nienhuys1-16/+26
On Windows we can't delete or overwrite files opened by other processes. Here we sketch how to handle this situation. We propose to use a random element in the filename. It's possible to design an alternate solution based on counters, but that would assign semantics to the filenames that complicates implementation. Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-02-23maintenance: fix incorrect `maintenance.repo` path with bare repositoryLibravatar Eric Sunshine2-17/+46
The periodic maintenance tasks configured by `git maintenance start` invoke `git for-each-repo` to run `git maintenance run` on each path specified by the multi-value global configuration variable `maintenance.repo`. Because `git for-each-repo` will likely be run outside of the repositories which require periodic maintenance, it is mandatory that the repository paths specified by `maintenance.repo` are absolute. Unfortunately, however, `git maintenance register` does nothing to ensure that the paths it assigns to `maintenance.repo` are indeed absolute, and may in fact -- especially in the case of a bare repository -- assign a relative path to `maintenance.repo` instead. Fix this problem by converting all paths to absolute before assigning them to `maintenance.repo`. While at it, also fix `git maintenance unregister` to convert paths to absolute, as well, in order to ensure that it can correctly remove from `maintenance.repo` a path assigned via `git maintenance register`. Reported-by: Clement Moyroud <clement.moyroud@gmail.com> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-02-22The tenth batchLibravatar Junio C Hamano1-0/+7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-02-22Merge branch 'ab/test-lib'Libravatar Junio C Hamano41-124/+107
Test framework clean-up. * ab/test-lib: test-lib-functions: assert correct parameter count test-lib-functions: remove bug-inducing "diagnostics" helper param test libs: rename "diff-lib" to "lib-diff" t/.gitattributes: sort lines test-lib-functions: move function to lib-bitmap.sh test libs: rename gitweb-lib.sh to lib-gitweb.sh test libs: rename bundle helper to "lib-bundle.sh" test-lib-functions: remove generate_zero_bytes() wrapper test-lib-functions: move test_set_index_version() to its user test lib: change "error" to "BUG" as appropriate test-lib: remove check_var_migration
2021-02-22Merge branch 'ab/diff-deferred-free'Libravatar Junio C Hamano4-20/+60
A small memleak in "diff -I<regexp>" has been corrected. * ab/diff-deferred-free: diff: plug memory leak from regcomp() on {log,diff} -I diff: add an API for deferred freeing