Subject: What's cooking in git.git (Sep 2024, #02; Sun, 8)

From: Junio C Hamano <[email-masked]>
Date: Sun, 08 Sep 2024 19:38:17 -0700

Here are the topics that have been cooking in my tree.  Commits
prefixed with '+' are in 'next' (being in 'next' is a sign that a
topic is stable enough to be used and are candidate to be in a
future release).  Commits prefixed with '-' are only in 'seen', and
aren't considered "accepted" at all and may be annotated with an URL
to a message that raises issues but they are no means exhaustive.  A
topic without enough support may be discarded after a long period of
no activity (of course they can be resubmit when new interests
arise).

Copies of the source code to Git live in many repositories, and the
following is a list of the ones I push into or their mirrors.  Some
repositories have only a subset of branches.

With maint, master, next, seen, todo:

	git://git.kernel.org/pub/scm/git/git.git/
	git://repo.or.cz/alt-git.git/
	https://kernel.googlesource.com/pub/scm/git/git/
	https://github.com/git/git/
	https://gitlab.com/git-scm/git/

With all the integration branches and topics broken out:

	https://github.com/gitster/git/

Even though the preformatted documentation in HTML and man format
are not sources, they are published in these repositories for
convenience (replace "htmldocs" with "manpages" for the manual
pages):

	git://git.kernel.org/pub/scm/git/git-htmldocs.git/
	https://github.com/gitster/git-htmldocs.git/

Release tarballs are available at:

	https://www.kernel.org/pub/software/scm/git/

--------------------------------------------------
[Graduated to 'master']

* jc/maybe-unused (2024-08-29) 2 commits
  (merged to 'next' on 2024-08-30 at e5961a9dc9)
 + CodingGuidelines: also mention MAYBE_UNUSED
 + Merge branch 'jk/unused-parameters' into jc/maybe-unused
 (this branch uses jk/unused-parameters.)

 Developer doc updates.
 source: <[email-masked]>

* jc/unused-on-windows (2024-08-30) 1 commit
  (merged to 'next' on 2024-08-30 at a2a2aa6e59)
 + refs/files-backend: work around -Wunused-parameter

 Fix more fallouts from -Werror=unused-parameter.
 source: <[email-masked]>

* jk/maybe-unused-cleanup (2024-08-29) 2 commits
  (merged to 'next' on 2024-08-30 at 0ff6ea5748)
 + grep: prefer UNUSED to MAYBE_UNUSED for pcre allocators
 + gc: drop MAYBE_UNUSED annotation from used parameter

 Code clean-up.
 source: <[email-masked]>

* jk/send-email-mailmap (2024-08-27) 3 commits
  (merged to 'next' on 2024-08-30 at a5cf30460a)
 + send-email: add mailmap support via sendemail.mailmap and --mailmap
 + check-mailmap: add options for additional mailmap sources
 + check-mailmap: accept "user@host" contacts

 "git send-email" learned "--mailmap" option to allow rewriting the
 recipient addresses.
 source: <[email-masked]>

* jk/unused-parameters (2024-08-28) 7 commits
  (merged to 'next' on 2024-08-30 at 2c5169ff52)
 + CodingGuidelines: mention -Wunused-parameter and UNUSED
 + config.mak.dev: enable -Wunused-parameter by default
 + compat: mark unused parameters in win32/mingw functions
 + compat: disable -Wunused-parameter in win32/headless.c
 + compat: disable -Wunused-parameter in 3rd-party code
 + t-reftable-readwrite: mark unused parameter in callback function
 + gc: mark unused config parameter in virtual functions
 (this branch is used by jc/maybe-unused.)

 Make our codebase compilable with the -Werror=unused-parameter
 option.
 source: <[email-masked]>
 source: <[email-masked]>

--------------------------------------------------
[New Topics]

* ds/doc-wholesale-disabling-advice-messages (2024-09-06) 1 commit
  (merged to 'next' on 2024-09-07 at a52a31f161)
 + advice: recommend GIT_ADVICE=0 for tools

 The environment GIT_ADVICE has been intentionally kept undocumented
 to discourage its use by interactive users.  Add documentation to
 help tool writers.

 Will merge to 'master'.
 source: <[email-masked]>

* jk/sparse-fdleak-fix (2024-09-06) 3 commits
  (merged to 'next' on 2024-09-07 at 2551aeee9e)
 + sparse-checkout: use fdopen_lock_file() instead of xfdopen()
 + sparse-checkout: check commit_lock_file when writing patterns
 + sparse-checkout: consolidate cleanup when writing patterns

 A file descriptor left open is now properly closed when "git
 sparse-checkout" updates the sparse patterns.

 Will merge to 'master'.
 source: <[email-masked]>

* bl/trailers-and-incomplete-last-line-fix (2024-09-06) 1 commit
 - interpret-trailers: handle message without trailing newline

 The interpret-trailers command failed to recognise the end of the
 message when the commit log ends in an incomplete line.

 Will merge to 'next'?
 source: <[email-masked]>

* sp/mailmap (2024-09-06) 1 commit
  (merged to 'next' on 2024-09-07 at aa952cf271)
 + .mailmap document current address.

 Update to a mailmap entry.

 Will merge to 'master'.
 source: <[email-masked]>

* jc/doc-skip-fetch-all-and-prefetch (2024-09-07) 1 commit
 - doc: remote.*.skip{DefaultUpdate,FetchAll} stops prefetch

 Doc updates.

 Will merge to 'next'.
 source: <[email-masked]>

* rs/diff-exit-code-fix (2024-09-08) 2 commits
 - diff: report dirty submodules as changes in builtin_diff()
 - diff: report copies and renames as changes in run_diff_cmd()

 In a few corner cases "git diff --exit-code" failed to report
 "changes" (e.g., renamed without any content change), which has
 been corrected.

 Will merge to 'next'.
 source: <[email-masked]>

--------------------------------------------------
[Cooking]

* jk/free-commit-buffer-of-skipped-commits (2024-08-30) 1 commit
  (merged to 'next' on 2024-09-03 at a8fb72a4d5)
 + revision: free commit buffers for skipped commits

 The code forgot to discard unnecessary in-core commit buffer data
 for commits that "git log --skip=<number>" traversed but omitted
 from the output, which has been corrected.

 Will merge to 'master'.
 source: <[email-masked]>

* ah/mergetols-vscode (2024-09-01) 1 commit
  (merged to 'next' on 2024-09-04 at 425c5c83e2)
 + mergetools: vscode: new tool

 "git mergetool" learned to use VSCode as a merge backend.

 Will merge to 'master'.
 source: <[email-masked]>

* rj/compat-terminal-unused-fix (2024-09-01) 1 commit
  (merged to 'next' on 2024-09-04 at 4ad97be799)
 + compat/terminal: mark parameter of git_terminal_prompt() UNUSED

 Build fix.

 Will merge to 'master'.
 source: <[email-masked]>

* ps/declare-pack-redundamt-dead (2024-09-03) 1 commit
  (merged to 'next' on 2024-09-04 at 6a97b07329)
 + Documentation/BreakingChanges: announce removal of git-pack-redundant(1)

 "git pack-redundant" has been marked for removal in Git 3.0.

 Will merge to 'master'.
 source: <[email-masked]>

* pw/rebase-autostash-fix (2024-09-03) 1 commit
 - rebase: apply and cleanup autostash when rebase fails to start

 "git rebase --autostash" failed to resurrect the autostashed
 changes when the command gets aborted after giving back control
 asking for hlep in conflict resolution.

 Will merge to 'next'?
 source: <[email-masked]>

* cp/unit-test-reftable-stack (2024-09-08) 6 commits
 - t-reftable-stack: add test for stack iterators
 - t-reftable-stack: add test for non-default compaction factor
 - t-reftable-stack: use reftable_ref_record_equal() to compare ref records
 - t-reftable-stack: use Git's tempfile API instead of mkstemp()
 - t: harmonize t-reftable-stack.c with coding guidelines
 - t: move reftable/stack_test.c to the unit testing framework

 Another reftable test migrated to the unit-test framework.

 Will merge to 'next'.
 source: <[email-masked]>

* kl/cat-file-on-sparse-index (2024-09-04) 2 commits
  (merged to 'next' on 2024-09-06 at a3c78e9398)
 + builtin/cat-file: mark 'git cat-file' sparse-index compatible
 + t1092: allow run_on_* functions to use standard input

 "git cat-file" works well with the sparse-index, and gets marked as
 such.

 Will merge to 'master'.
 source: <[email-masked]>

* ps/index-pack-outside-repo-fix (2024-09-04) 1 commit
  (merged to 'next' on 2024-09-05 at d7ff867595)
 + builtin/index-pack: fix segfaults when running outside of a repo

 "git verify-pack" and "git index-pack" started dying outside a
 repository, which has been corrected.

 Will merge to 'master'.
 source: <[email-masked]>

* ps/pack-refs-auto-heuristics (2024-09-04) 3 commits
  (merged to 'next' on 2024-09-06 at 068ed2f7ae)
 + refs/files: use heuristic to decide whether to repack with `--auto`
 + t0601: merge tests for auto-packing of refs
 + wrapper: introduce `log2u()`

 "git pack-refs --auto" for the files backend was too aggressive,
 which has been a bit tamed.

 Will merge to 'master'.
 source: <[email-masked]>

* ds/scalar-no-tags (2024-09-06) 1 commit
  (merged to 'next' on 2024-09-07 at fc06d19cfb)
 + scalar: add --no-tags option to 'scalar clone'

 The "scalar clone" command learned the "--no-tags" option.

 Will merge to 'master'.
 source: <[email-masked]>

* jc/pass-repo-to-builtins (2024-09-05) 4 commits
 - fixup! builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h
 - add: pass in repo variable instead of global the_repository
 - builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h
 - builtin: add a repository parameter for builtin functions

 The convention to calling into built-in command implementation has
 been updated to pass the repository, if known, together with the
 prefix value.

 Needs review.
 source: <[email-masked]>

* jk/messages-with-excess-lf-fix (2024-09-05) 1 commit
  (merged to 'next' on 2024-09-06 at edb0958483)
 + drop trailing newline from warning/error/die messages

 One-line messages to "die" and other helper functions will get LF
 added by these helper functions, but many existing messages had an
 unnecessary LF at the end, which have been corrected.

 Will merge to 'master'.
 source: <[email-masked]>

* tb/weak-sha1-for-tail-sum (2024-09-06) 9 commits
 - csum-file.c: use fast SHA-1 implementation when available
 - Makefile: allow specifying a SHA-1 for non-cryptographic uses
 - hash.h: scaffolding for _fast hashing variants
 - sha1: do not redefine `platform_SHA_CTX` and friends
 - i5500-git-daemon.sh: use compile-able version of Git without OpenSSL
 - pack-objects: use finalize_object_file() to rename pack/idx/etc
 - finalize_object_file(): implement collision check
 - finalize_object_file(): refactor unlink_or_warn() placement
 - finalize_object_file(): check for name collision before renaming

 The checksum at the tail of files are now computed without
 collision detection protection.

 Will merge to 'next'?
 source: <[email-masked]>

* tb/multi-pack-reuse-fix (2024-08-27) 5 commits
  (merged to 'next' on 2024-09-06 at 552494ec2f)
 + builtin/pack-objects.c: do not open-code `MAX_PACK_OBJECT_HEADER`
 + pack-bitmap.c: avoid repeated `pack_pos_to_offset()` during reuse
 + builtin/pack-objects.c: translate bit positions during pack-reuse
 + pack-bitmap: tag bitmapped packs with their corresponding MIDX
 + t/t5332-multi-pack-reuse.sh: verify pack generation with --strict

 A data corruption bug when multi-pack-index is used and the same
 objects are stored in multiple packfiles has been corrected.

 Will merge to 'master'.
 cf. <[email-masked]>
 source: <[email-masked]>

* es/chainlint-message-updates (2024-08-29) 2 commits
 - chainlint: reduce annotation noise-factor
 - chainlint: make error messages self-explanatory

 The error messages from the test script checker have been improved.

 Expecting a reroll.
 cf. <CAPig+cQ+6am7-BSnWZz5=[email-masked]>
 source: <[email-masked]>

* ps/environ-wo-the-repository (2024-08-30) 21 commits
 - environment: stop storing "core.notesRef" globally
 - environment: stop storing "core.warnAmbiguousRefs" globally
 - environment: stop storing "core.preferSymlinkRefs" globally
 - environment: stop storing "core.logAllRefUpdates" globally
 - refs: stop modifying global `log_all_ref_updates` variable
 - branch: stop modifying `log_all_ref_updates` variable
 - repo-settings: track defaults close to `struct repo_settings`
 - repo-settings: split out declarations into a standalone header
 - environment: guard state depending on a repository
 - environment: reorder header to split out `the_repository`-free section
 - environment: move `set_git_dir()` and related into setup layer
 - environment: make `get_git_namespace()` self-contained
 - environment: move `odb_mkstemp()` into object layer
 - config: make dependency on repo in `read_early_config()` explicit
 - config: document `read_early_config()` and `read_very_early_config()`
 - environment: make `get_git_work_tree()` accept a repository
 - environment: make `get_graft_file()` accept a repository
 - environment: make `get_index_file()` accept a repository
 - environment: make `get_object_directory()` accept a repository
 - environment: make `get_git_common_dir()` accept a repository
 - environment: make `get_git_dir()` accept a repository

 Code clean-up.

 Needs review.
 source: <[email-masked]>

* gt/unit-test-oid-array (2024-09-01) 1 commit
  (merged to 'next' on 2024-09-05 at 92d0881bb0)
 + t: port helper/test-oid-array.c to unit-tests/t-oid-array.c

 Another unit-test.

 Will merge to 'master'.
 source: <[email-masked]>

* gt/unit-test-oidset (2024-08-25) 1 commit
 - unit-tests: add tests for oidset.h

 Another unit-test.

 Expecting a reroll.
 source: <[email-masked]>

* ps/leakfixes-part-6 (2024-09-05) 22 commits
 - builtin/repack: fix leaking keep-pack list
 - merge-ort: fix two leaks when handling directory rename modifications
 - match-trees: fix leaking prefixes in `shift_tree()`
 - builtin/fmt-merge-msg: fix leaking buffers
 - builtin/grep: fix leaking object context
 - builtin/pack-objects: plug leaking list of keep-packs
 - builtin/repack: fix leaking line buffer when packing promisors
 - negotiator/skipping: fix leaking commit entries
 - shallow: fix leaking members of `struct shallow_info`
 - shallow: free grafts when unregistering them
 - object: clear grafts when clearing parsed object pool
 - gpg-interface: fix misdesigned signing key interfaces
 - send-pack: fix leaking push cert nonce
 - remote: fix leak in reachability check of a remote-tracking ref
 - remote: fix leaking tracking refs
 - builtin/submodule--helper: fix leaking refs on push-check
 - submodule: fix leaking fetch task data
 - upload-pack: fix leaking child process data on reachability checks
 - builtin/push: fix leaking refspec query result
 - send-pack: fix leaking common object IDs
 - fetch-pack: fix memory leaks on fetch negotiation
 - t/test-lib: allow skipping leak checks for passing tests

 More leakfixes.

 Will merge to 'next'?
 source: <[email-masked]>

* sj/ref-contents-check (2024-09-03) 4 commits
 - ref: add symlink ref content check for files backend
 - ref: add symref content check for files backend
 - ref: add regular ref content check for files backend
 - ref: initialize "fsck_ref_report" with zero

 "git fsck" learned to issue warnings on "curiously formatted" ref
 contents that have always been taken valid but something Git
 wouldn't have written itself (e.g., missing terminating end-of-line
 after the full object name).

 Ready?
 source: <Ztb-mgl50cwGVO8A@ArchLinux>

* jc/mailinfo-header-cleanup (2024-08-20) 1 commit
  (merged to 'next' on 2024-09-05 at 9a30adb035)
 + mailinfo: we parse fixed headers

 Code clean-up.

 Will merge to 'master'.
 cf. <Zsb1rGQbglHMiBHI@tanuki>
 source: <[email-masked]>

* tb/incremental-midx-part-2 (2024-08-28) 16 commits
 - fixup! midx: implement writing incremental MIDX bitmaps
 - midx: implement writing incremental MIDX bitmaps
 - pack-bitmap.c: use `ewah_or_iterator` for type bitmap iterators
 - pack-bitmap.c: keep track of each layer's type bitmaps
 - ewah: implement `struct ewah_or_iterator`
 - pack-bitmap.c: apply pseudo-merge commits with incremental MIDXs
 - pack-bitmap.c: compute disk-usage with incremental MIDXs
 - pack-bitmap.c: teach `rev-list --test-bitmap` about incremental MIDXs
 - pack-bitmap.c: support bitmap pack-reuse with incremental MIDXs
 - pack-bitmap.c: teach `show_objects_for_type()` about incremental MIDXs
 - pack-bitmap.c: teach `bitmap_for_commit()` about incremental MIDXs
 - pack-bitmap.c: open and store incremental bitmap layers
 - pack-revindex: prepare for incremental MIDX bitmaps
 - Documentation: describe incremental MIDX bitmaps
 - Merge branch 'tb/pseudo-merge-bitmap-fixes' into tb/incremental-midx-part-2
 - Merge branch 'tb/incremental-midx-part-1' into tb/incremental-midx-part-2

 Incremental updates of multi-pack index files.

 Needs review.
 source: <[email-masked]>

* ps/clar-unit-test (2024-09-04) 14 commits
  (merged to 'next' on 2024-09-05 at 87fb0a399a)
 + clar: add CMake support
 + t/unit-tests: convert ctype tests to use clar
 + t/unit-tests: convert strvec tests to use clar
 + t/unit-tests: implement test driver
 + Makefile: wire up the clar unit testing framework
 + Makefile: do not use sparse on third-party sources
 + Makefile: make hdr-check depend on generated headers
 + Makefile: fix sparse dependency on GENERATED_H
 + clar: stop including `shellapi.h` unnecessarily
 + clar(win32): avoid compile error due to unused `fs_copy()`
 + clar: avoid compile error with mingw-w64
 + t/clar: fix compatibility with NonStop
 + t: import the clar unit testing framework
 + t: do not pass GIT_TEST_OPTS to unit tests with prove

 Import clar unit tests framework libgit2 folks invented for our
 use.

 Will merge to 'master'.
 cf. <[email-masked]>
 source: <[email-masked]>

* js/libgit-rust (2024-09-06) 6 commits
 . Makefile: add option to build and test libgit-rs and libgit-rs-sys
 . libgit: add higher-level libgit crate
 . config: add git_configset_alloc() and git_configset_clear_and_free()
 . libgit-sys: add repo initialization and config access
 . libgit-sys: introduce Rust wrapper for libgit.a
 . common-main: split init and exit code into new files

 An rust binding to libgit.a functions has been introduced.

 Expecting a reroll.
 cf. <[email-masked]>
 source: <[email-masked]>

* jc/range-diff-lazy-setup (2024-08-09) 2 commits
 - remerge-diff: clean up temporary objdir at a central place
 - remerge-diff: lazily prepare temporary objdir on demand

 Code clean-up.

 Will merge to 'next'.
 source: <[email-masked]>

* jc/too-many-arguments (2024-08-06) 4 commits
 - miscellaneous: avoid "too many arguments"
 - notes: avoid "too many arguments"
 - cat-file: avoid "too many arguments"
 - refs: avoid "too many arguments"

 Error message clarification.

 On hold.
 source: <[email-masked]>

* ja/doc-synopsis-markup (2024-09-05) 3 commits
 - doc: apply synopsis simplification on git-clone and git-init
 - doc: update the guidelines to reflect the current formatting rules
 - doc: introduce a synopsis typesetting

 The way AsciiDoc is used for SYNOPSIS part of the manual pages has
 been revamped.  The sources, at least for the simple cases, got
 vastly pleasant to work with.

 Waiting for comments.
 source: <[email-masked]>

* ew/cat-file-optim (2024-08-25) 10 commits
 - cat-file: use writev(2) if available
 - cat-file: batch_write: use size_t for length
 - cat-file: batch-command uses content_limit
 - object_info: content_limit only applies to blobs
 - packfile: packed_object_info avoids packed_to_object_type
 - cat-file: use delta_base_cache entries directly
 - packfile: inline cache_or_unpack_entry
 - packfile: fix off-by-one in content_limit comparison
 - packfile: allow content-limit for cat-file
 - packfile: move sizep computation

 "git cat-file --batch" has been optimized.

 Waiting for review responses.
 source: <[email-masked]>

--------------------------------------------------
[Will discard]

* cc/promisor-remote-capability (2024-07-31) 4 commits
 - promisor-remote: check advertised name or URL
 - Add 'promisor-remote' capability to protocol v2
 - strbuf: refactor strbuf_trim_trailing_ch()
 - version: refactor strbuf_sanitize()

 The v2 protocol learned to allow the server to advertise possible
 promisor remotes, and the client to respond with what promissor
 remotes it uses, so that the server side can omit objects that the
 client can lazily obtain from these other promissor remotes.

 Will discard.
 Has been expecting a reroll for too long.
 cf. <ZrDYIFolRlERFdUT@tanuki>
 source: <[email-masked]>

* tc/fetch-bundle-uri (2024-07-24) 3 commits
 - fetch: use bundle URIs when having creationToken heuristic
 - transport: introduce transport_has_remote_bundle_uri()
 - clone: remove double bundle list clear code

 Allow "git fetch" take advantage of bundleURI feature.

 Will discard.
 Has been expecting a reroll for too long.
 source: <ZqObobw8FsDMkllm@tanuki>

--------------------------------------------------
[Discarded]

* pp/add-parse-range-unit-test (2024-08-28) 2 commits
 . SQUASH???
 . apply: add unit tests for parse_range

 A unit test for code that parses the hunk offset and length from a
 patch fragment header as been added.

 Has been expecting a reroll for too long.
 cf. <[email-masked]>
 source: <[email-masked]>

* sk/enable-prefetch-per-remote (2024-09-05) 1 commit
 . remote: prefetch config

 The prefetch task of "git maintenance" learned to honor the
 "remote.<name>.prefetch" configuration variable, which can be used
 to selectively disable prefetching from selected remote
 repositories.

 Retracted.
 cf. <CAG=Um+0X3Umt-2TQ-BGeefqdGxfVoy2Ug0tGKLycrX=_pj=[email-masked]>
 source: <[email-masked]>