summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
15 hoursThe ninth batchHEADmastermainJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 hoursMerge branch 'jk/doc-remote-helpers-markup-fix'Junio C Hamano
Doc mark-up fix. * jk/doc-remote-helpers-markup-fix: doc/gitremote-helpers: fix missing single-quote
15 hoursMerge branch 'jh/trace2-missing-def-param-fix'Junio C Hamano
Some trace2 events that lacked def_param have learned to show it, enriching the output. Reviewed-by: Josh Steadmon <steadmon@google.com> cf. <ZejkVOVQBZhLVfHW@google.com> * jh/trace2-missing-def-param-fix: trace2: emit 'def_param' set with 'cmd_name' event trace2: avoid emitting 'def_param' set more than once t0211: demonstrate missing 'def_param' events for certain commands
15 hoursMerge branch 'pw/rebase-i-ignore-cherry-pick-help-environment'Junio C Hamano
Code simplification by getting rid of code that sets an environment variable that is no longer used. * pw/rebase-i-ignore-cherry-pick-help-environment: rebase -i: stop setting GIT_CHERRY_PICK_HELP
3 daysThe eighth batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 daysMerge branch 'hd/config-mak-os390'Junio C Hamano
Platform specific tweaks for OS/390 has been added to config.mak.uname. * hd/config-mak-os390: build: support z/OS (OS/390).
3 daysMerge branch 'vm/t7301-use-test-path-helpers'Junio C Hamano
GSoC practice to replace "test -f" with "test_path_is_file". * vm/t7301-use-test-path-helpers: t7301: use test_path_is_(missing|file)
3 daysMerge branch 'jc/xwrite-cleanup'Junio C Hamano
Uses of xwrite() helper have been audited and updated for better error checking and simpler code. * jc/xwrite-cleanup: repack: check error writing to pack-objects subprocess sideband: avoid short write(2) unpack: replace xwrite() loop with write_in_full()
3 daysMerge branch 'ag/t0010-modernize'Junio C Hamano
GSoC practice to modernize a test script. * ag/t0010-modernize: tests: modernize the test script t0010-racy-git.sh
3 daysMerge branch 'as/option-names-in-messages'Junio C Hamano
Error message updates. * as/option-names-in-messages: revision.c: trivial fix to message builtin/clone.c: trivial fix of message builtin/remote.c: trivial fix of error message transport-helper.c: trivial fix of error message
3 daysMerge branch 'kh/branch-ref-syntax-advice'Junio C Hamano
When git refuses to create a branch because the proposed branch name is not a valid refname, an advice message is given to refer the user to exact naming rules. * kh/branch-ref-syntax-advice: branch: advise about ref syntax rules advice: use double quotes for regular quoting advice: use backticks for verbatim advice: make all entries stylistically consistent t3200: improve test style
5 daysThe seventh batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 daysMerge branch 'rj/complete-worktree-paths-fix'Junio C Hamano
The logic to complete the command line arguments to "git worktree" subcommand (in contrib/) has been updated to correctly honor things like "git -C dir" etc. * rj/complete-worktree-paths-fix: completion: fix __git_complete_worktree_paths
5 daysMerge branch 'rj/complete-reflog'Junio C Hamano
The command line completion script (in contrib/) learned to complete "git reflog" better. * rj/complete-reflog: completion: reflog subcommands and options completion: factor out __git_resolve_builtins completion: introduce __git_find_subcommand completion: reflog show <log-options> completion: reflog with implicit "show"
5 daysMerge branch 'jc/test-i18ngrep'Junio C Hamano
With release 2.44 we got rid of all uses of test_i18ngrep and there is no in-flight topic that adds a new use of it. Make a call to test_i18ngrep a hard failure, so that we can remove it at the end of this release cycle. * jc/test-i18ngrep: test_i18ngrep: hard deprecate and forbid its use
5 daysMerge branch 'gt/core-bare-in-templates'Junio C Hamano
Code simplification. * gt/core-bare-in-templates: setup: remove unnecessary variable
5 daysMerge branch 'la/trailer-api'Junio C Hamano
Trailer API updates. Acked-by: Christian Couder <christian.couder@gmail.com> cf. <CAP8UFD1Zd+9q0z1JmfOf60S2vn5-sD3SafDvAJUzRFwHJKcb8A@mail.gmail.com> * la/trailer-api: format_trailers_from_commit(): indirectly call trailer_info_get() format_trailer_info(): move "fast path" to caller format_trailers(): use strbuf instead of FILE trailer_info_get(): reorder parameters trailer: move interpret_trailers() to interpret-trailers.c trailer: reorder format_trailers_from_commit() parameters trailer: rename functions to use 'trailer' shortlog: add test for de-duplicating folded trailers trailer: free trailer_info _after_ all related usage
5 daysMerge branch 'kh/doc-commentchar-is-a-byte'Junio C Hamano
The "core.commentChar" configuration variable only allows an ASCII character, which was not clearly documented, which has been corrected. * kh/doc-commentchar-is-a-byte: config: document `core.commentChar` as ASCII-only
5 daysMerge branch 'jh/fsmonitor-icase-corner-case-fix'Junio C Hamano
FSMonitor client code was confused when FSEvents were given in a different case on a case-insensitive filesystem, which has been corrected. Acked-by: Patrick Steinhardt <ps@pks.im> cf. <ZehofMaSZyUq8S1N@tanuki> * jh/fsmonitor-icase-corner-case-fix: fsmonitor: support case-insensitive events fsmonitor: refactor bit invalidation in refresh callback fsmonitor: trace the new invalidated cache-entry count fsmonitor: return invalidated cache-entry count on non-directory event fsmonitor: remove custom loop from non-directory path handler fsmonitor: return invalidated cache-entry count on directory event fsmonitor: move untracked-cache invalidation into helper functions fsmonitor: refactor untracked-cache invalidation dir: create untracked_cache_invalidate_trimmed_path() fsmonitor: refactor refresh callback for non-directory events fsmonitor: clarify handling of directory events in callback helper fsmonitor: refactor refresh callback on directory events t7527: add case-insensitve test for FSMonitor name-hash: add index_dir_find()
5 daysMerge branch 'ps/reftable-iteration-perf-part2'Junio C Hamano
The code to iterate over refs with the reftable backend has seen some optimization. * ps/reftable-iteration-perf-part2: refs/reftable: precompute prefix length reftable: allow inlining of a few functions reftable/record: decode keys in place reftable/record: reuse refname when copying reftable/record: reuse refname when decoding reftable/merged: avoid duplicate pqueue emptiness check reftable/merged: circumvent pqueue with single subiter reftable/merged: handle subiter cleanup on close only reftable/merged: remove unnecessary null check for subiters reftable/merged: make subiters own their records reftable/merged: advance subiter on subsequent iteration reftable/merged: make `merged_iter` structure private reftable/pq: use `size_t` to track iterator index
5 daysMerge branch 'so/clean-dry-run-without-force'Junio C Hamano
The implementation in "git clean" that makes "-n" and "-i" ignore clean.requireForce has been simplified, together with the documentation. * so/clean-dry-run-without-force: clean: further clean-up of implementation around "--force" clean: improve -n and -f implementation and documentation
8 daysThe sixth batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 daysMerge branch 'sj/t9117-path-is-file'Junio C Hamano
GSoC practice to replace "test -f" with "test_path_is_file". * sj/t9117-path-is-file: t9117: prefer test_path_* helper functions
8 daysMerge branch 'kh/doc-dashed-commands-have-not-worked-for-a-long-time'Junio C Hamano
Doc update. * kh/doc-dashed-commands-have-not-worked-for-a-long-time: gitcli: drop mention of “non-dashed form”
8 daysMerge branch 'rs/t-ctype-simplify'Junio C Hamano
Code simplification to one unit-test program. * rs/t-ctype-simplify: t-ctype: avoid duplicating class names t-ctype: align output of i t-ctype: simplify EOF check t-ctype: allow NUL anywhere in the specification string
8 daysMerge branch 'es/config-doc-sort-sections'Junio C Hamano
Doc updates. * es/config-doc-sort-sections: docs: sort configuration variable groupings alphabetically
8 daysMerge branch 'js/merge-base-with-missing-commit'Junio C Hamano
Make sure failure return from merge_bases_many() is properly caught. * js/merge-base-with-missing-commit: merge-ort/merge-recursive: do report errors in `merge_submodule()` merge-recursive: prepare for `merge_submodule()` to report errors commit-reach(repo_get_merge_bases_many_dirty): pass on errors commit-reach(repo_get_merge_bases_many): pass on "missing commits" errors commit-reach(get_octopus_merge_bases): pass on "missing commits" errors commit-reach(repo_get_merge_bases): pass on "missing commits" errors commit-reach(get_merge_bases_many_0): pass on "missing commits" errors commit-reach(merge_bases_many): pass on "missing commits" errors commit-reach(paint_down_to_common): start reporting errors commit-reach(paint_down_to_common): prepare for handling shallow commits commit-reach(repo_in_merge_bases_many): report missing commits commit-reach(repo_in_merge_bases_many): optionally expect missing commits commit-reach(paint_down_to_common): plug two memory leaks
10 daysmerge-ort/merge-recursive: do report errors in `merge_submodule()`Johannes Schindelin
In 24876ebf68b (commit-reach(repo_in_merge_bases_many): report missing commits, 2024-02-28), I taught `merge_submodule()` to handle errors reported by `repo_in_merge_bases_many()`. However, those errors were not passed through to the callers. That was unintentional, and this commit remedies that. Note that `find_first_merges()` can now also return -1 (because it passes through that return value from `repo_in_merge_bases()`), and this commit also adds the forgotten handling for that scenario. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Acked-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 daysmerge-recursive: prepare for `merge_submodule()` to report errorsJohannes Schindelin
The `merge_submodule()` function returns an integer that indicates whether the merge was clean (returning 1) or unclean (returning 0). Like the version in `merge-ort.c`, the version in `merge-recursive.c` does not report any errors (such as repository corruption) by returning -1 as of time of writing, even if the callers in `merge-ort.c` are prepared for exactly such errors. However, we want to teach (both variants of) the `merge_submodule()` function that trick: to report errors by returning -1. Therefore, prepare the caller in `merge-recursive.c` to handle that scenario. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Acked-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 daysThe fifth batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 daysMerge branch 'jk/upload-pack-v2-capability-cleanup'Junio C Hamano
The upload-pack program, when talking over v2, accepted the packfile-uris protocol extension from the client, even if it did not advertise the capability, which has been corrected. * jk/upload-pack-v2-capability-cleanup: upload-pack: only accept packfile-uris if we advertised it upload-pack: use existing config mechanism for advertisement upload-pack: centralize setup of sideband-all config upload-pack: use repository struct to get config
11 daysMerge branch 'jk/upload-pack-bounded-resources'Junio C Hamano
Various parts of upload-pack has been updated to bound the resource consumption relative to the size of the repository to protect from abusive clients. * jk/upload-pack-bounded-resources: upload-pack: free tree buffers after parsing upload-pack: use PARSE_OBJECT_SKIP_HASH_CHECK in more places upload-pack: always turn off save_commit_buffer upload-pack: disallow object-info capability by default upload-pack: accept only a single packfile-uri line upload-pack: use a strmap for want-ref lines upload-pack: use oidset for deepen_not list upload-pack: switch deepen-not list to an oid_array upload-pack: drop separate v2 "haves" array
11 daysMerge branch 'ps/reftable-repo-init-fix'Junio C Hamano
Clear the fallout from a fix for 2.44 regression. * ps/reftable-repo-init-fix: t0610: remove unused variable assignment refs/reftable: don't fail empty transactions in repo without HEAD
11 daysMerge branch 'ps/remote-helper-repo-initialization-fix'Junio C Hamano
A custom remote helper no longer cannot access the newly created repository during "git clone", which is a regression in Git 2.44. This has been corrected. * ps/remote-helper-repo-initialization-fix: builtin/clone: allow remote helpers to detect repo
11 daysMerge branch 'ml/log-merge-with-cherry-pick-and-other-pseudo-heads'Junio C Hamano
"git log --merge" learned to pay attention to CHERRY_PICK_HEAD and other kinds of *_HEAD pseudorefs. * ml/log-merge-with-cherry-pick-and-other-pseudo-heads: revision: implement `git log --merge` also for rebase/cherry-pick/revert revision: ensure MERGE_HEAD is a ref in prepare_show_merge
11 daysMerge branch 'eg/add-uflags'Junio C Hamano
Code clean-up practice. * eg/add-uflags: add: use unsigned type for collection of bits
11 daysMerge branch 'jt/commit-redundant-scissors-fix'Junio C Hamano
"git commit -v --cleanup=scissors" used to add the scissors line twice in the log message buffer, which has been corrected. * jt/commit-redundant-scissors-fix: commit: unify logic to avoid multiple scissors lines when merging commit: avoid redundant scissor line with --cleanup=scissors -v
11 daysMerge branch 'js/merge-tree-3-trees'Junio C Hamano
"git merge-tree" has learned that the three trees involved in the 3-way merge only need to be trees, not necessarily commits. * js/merge-tree-3-trees: fill_tree_descriptor(): mark error message for translation cache-tree: avoid an unnecessary check Always check `parse_tree*()`'s return value t4301: verify that merge-tree fails on missing blob objects merge-ort: do check `parse_tree()`'s return value merge-tree: fail with a non-zero exit code on missing tree objects merge-tree: accept 3 trees as arguments
11 daysMerge branch 'cc/rev-list-allow-missing-tips'Junio C Hamano
"git rev-list --missing=print" has learned to optionally take "--allow-missing-tips", which allows the objects at the starting points to be missing. * cc/rev-list-allow-missing-tips: revision: fix --missing=[print|allow*] for annotated tags rev-list: allow missing tips with --missing=[print|allow*] t6022: fix 'test' style and 'even though' typo oidset: refactor oidset_insert_from_set() revision: clarify a 'return NULL' in get_reference()
11 daysMerge branch 'jc/no-lazy-fetch'Junio C Hamano
"git --no-lazy-fetch cmd" allows to run "cmd" while disabling lazy fetching of objects from the promisor remote, which may be handy for debugging. * jc/no-lazy-fetch: git: extend --no-lazy-fetch to work across subprocesses git: document GIT_NO_REPLACE_OBJECTS environment variable git: --no-lazy-fetch option
12 daysdoc/gitremote-helpers: fix missing single-quoteJeff King
The formatting around "option push-option" was missing its closing quote, leading to the output having a stray opening quote, rather than rendering the item in italics (as we do for all of the other options in the list). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 daystrace2: emit 'def_param' set with 'cmd_name' eventJeff Hostetler
Some commands do not cause a set of 'def_param' events to be emitted. This includes "git-remote-https", "git-http-fetch", and various "query" commands, like "git --man-path". Since all of these commands do emit a 'cmd_name' event, add code to the "trace2_cmd_name()" function to generate the set of 'def_param' events. Remove explicit calls to "trace2_cmd_list_config()" and "trace2_cmd_list_env_vars()" in git.c since they are no longer needed. Reviewed-by: Josh Steadmon <steadmon@google.com> Signed-off-by: Jeff Hostetler <jeffhostetler@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 daystrace2: avoid emitting 'def_param' set more than onceJeff Hostetler
During nested alias expansion it is possible for "trace2_cmd_list_config()" and "trace2_cmd_list_env_vars()" to be called more than once. This causes a full set of 'def_param' events to be emitted each time. Let's avoid that. Add code to those two functions to only emit them once. Signed-off-by: Jeff Hostetler <jeffhostetler@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 dayst0211: demonstrate missing 'def_param' events for certain commandsJeff Hostetler
Some Git commands fail to emit 'def_param' events for interesting config and environment variable settings. Add unit tests to demonstrate this. Most commands are considered "builtin" and are based upon git.c. These typically do emit 'def_param' events. Exceptions are some of the "query" commands, the "run-dashed" mechanism, and alias handling. Commands built from remote-curl.c (instead of git.c), such as "git-remote-https", do not emit 'def_param' events. Likewise, "git-http-fetch" is built http-fetch.c and does not emit them. Signed-off-by: Jeff Hostetler <jeffhostetler@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 dayst7301: use test_path_is_(missing|file)Vincenzo Mezzela
Replace "test -f" and friends to use the test_path_is_file helper function and friends from test-lib-functions.sh. These functions perform identical operations while enhancing debugging capabilities in case of test failures. The original used 'test ! -f' to check if the file has been correctly cleaned, so 'test ! -e' would have been a better choice. Replace them with 'test_path_is_missing'. Signed-off-by: Vincenzo Mezzela <vincenzo.mezzela@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 daysfsmonitor: support case-insensitive eventsJeff Hostetler
Teach fsmonitor_refresh_callback() to handle case-insensitive lookups if case-sensitive lookups fail on case-insensitive systems. This can cause 'git status' to report stale status for files if there are case issues/errors in the worktree. The FSMonitor daemon sends FSEvents using the observed spelling of each pathname. On case-insensitive file systems this may be different than the expected case spelling. The existing code uses index_name_pos() to find the cache-entry for the pathname in the FSEvent and clear the CE_FSMONITOR_VALID bit so that the worktree scan/index refresh will revisit and revalidate the path. On a case-insensitive file system, the exact match lookup may fail to find the associated cache-entry. This causes status to think that the cached CE flags are correct and skip over the file. Update event handling to optionally use the name-hash and dir-name-hash if necessary. Also update t7527 to convert the "test_expect_failure" to "_success" now that we have fixed the bug. Signed-off-by: Jeff Hostetler <jeffhostetler@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 daysfsmonitor: refactor bit invalidation in refresh callbackJeff Hostetler
Refactor code in the fsmonitor_refresh_callback() call chain dealing with invalidating the CE_FSMONITOR_VALID bit and add a trace message. During the refresh, we clear the CE_FSMONITOR_VALID bit in response to data from the FSMonitor daemon (so that a later phase will lstat() and verify the true state of the file). Create a new function to clear the bit and add some unique tracing for it to help debug edge cases. This is similar to the existing `mark_fsmonitor_invalid()` function, but it also does untracked-cache invalidation and we've already handled that in the refresh-callback handlers, so but we don't need to repeat that. Signed-off-by: Jeff Hostetler <jeffhostetler@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 daysfsmonitor: trace the new invalidated cache-entry countJeff Hostetler
Consolidate the directory/non-directory calls to the refresh handler code. Log the resulting count of invalidated cache-entries. The nr_in_cone value will be used in a later commit to decide if we also need to try to do case-insensitive lookups. Signed-off-by: Jeff Hostetler <jeffhostetler@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 daysfsmonitor: return invalidated cache-entry count on non-directory eventJeff Hostetler
Teach the refresh callback helper function for unqualified FSEvents (pathnames without a trailing slash) to return the number of cache-entries that were invalided in response to the event. This will be used in a later commit to help determine if the observed pathname was (possibly) case-incorrect when (on a case-insensitive file system). Signed-off-by: Jeff Hostetler <jeffhostetler@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 dayst0610: remove unused variable assignmentPatrick Steinhardt
In b0f6b6b523 (refs/reftable: don't fail empty transactions in repo without HEAD, 2024-02-27), we have added a new test to t0610. This test contains a useless assignment to a variable that is never actually used. Remove it. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>